I have a simple testcase.cpp file with 2 .data files under my test folder. When I try to compile the test on OS X Lion, I get an error message that says:
g++ -o testcase testcase.cpp
However it does not compile and complains:
Undefined symbols for architecture x86_64
Has someone faced this error? Can you tell me if I need to set some flag or something while compiling?
Update: this is a graphics test case, so it includes glut. I tried to add -lglut to the command line, but that doesn’t help.
I found out the answer: you need to add “-framework OpenGL -framework GLUT” to the command line.