I'm trying to compile cpp file which included in /home/pi/opencv-3.1.0/samples/cpp
I opened the file in Code:Block, and trying to compile by G++
And I got a lot of mistake, so I know I am doing wrong to compile it

How do I compile these files?

Code: Select all
g++ -ggdb `pkg-config --cflags --libs opencv` facedetect.cpp -o facedetect
Code: Select all
(process:2534): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(Edge map:2534): Gtk-WARNING **: cannot open display: Thanks Kuisti8, but this is not working on LXTerminal.kusti8 wrote:You must have the GUI open while running that or if running it remotely, type:
export DISPLAY=:0
first
Code: Select all
(Edge map:3470) GdkGLExt-WARNING **: Window system doesn't support OpenGL. Code: Select all
No protocol specified
(Edge map:3509): Gtk-WARNING ** : cannot open display : :0 Thank kusti8,kusti8 wrote:You must have the GUI open while running that or if running it remotely, type:
export DISPLAY=:0
first