PDA

View Full Version : Std Error when compiling with GLUT



05-02-2004, 01:20 PM
Hi folks,

I'm working with a glut project and having comile errors (below).

I have added 'using namespace std;' to the hello.cpp file - to no avail. I believe I also have the current glut.h file and have referenced it correctly through CodeWarrior. This is code that I've been working with via xCode on the Mac and am porting to PC.

If you have solved this problem before, or have ideas on how to - please post back. Thanks! Tm

-- Compile Errors --

Error : Undefined symbol: '__stdcall(12) __glutInitWithExit (___glutInitWithExit@12)'
referenced from '__stdcall(8) glutInit_ATEXIT_HACK (_glutInit_ATEXIT_HACK@8)' in glut.h:486
glut.h line 486

Error : Undefined symbol: '__stdcall(8) __glutCreateWindowWithExit (___glutCreateWindowWithExit@8)'
referenced from '__stdcall(4) glutCreateWindow_ATEXIT_HACK (_glutCreateWindow_ATEXIT_HACK@4)' in glut.h:503
glut.h line 503

Error : Undefined symbol: '__stdcall(8) __glutCreateMenuWithExit (___glutCreateMenuWithExit@8)'
referenced from '__stdcall(4) glutCreateMenu_ATEXIT_HACK (_glutCreateMenu_ATEXIT_HACK@4)' in glut.h:549
glut.h line 549

Error : Undefined symbol: '__stdcall(0) glutPostRedisplay (_glutPostRedisplay@0)'
referenced from 'void myidle(void) (?myidle@@YAXXZ)' in hello.cpp:396
referenced from 'void menuSelect(int) (?menuSelect@@YAXH@Z)' in hello.cpp:481
hello.cpp line 396

Error : Undefined symbol: '__stdcall(4) glutIdleFunc (_glutIdleFunc@4)'
referenced from 'void visibility(int) (?visibility@@YAXH@Z)' in hello.cpp:488
referenced from 'void visibility(int) (?visibility@@YAXH@Z)' in hello.cpp:490
hello.cpp line 488

Error : Undefined symbol: '__stdcall(4) glutInitDisplayMode (_glutInitDisplayMode@4)'
referenced from '_main' in hello.cpp:502
hello.cpp line 502

Error : Undefined symbol: '__stdcall(8) glutInitWindowSize (_glutInitWindowSize@8)'
referenced from '_main' in hello.cpp:504
hello.cpp line 504

Error : Undefined symbol: '__stdcall(4) glutDisplayFunc (_glutDisplayFunc@4)'
referenced from '_main' in hello.cpp:509
hello.cpp line 509

Error : Undefined symbol: '__stdcall(4) glutVisibilityFunc (_glutVisibilityFunc@4)'
referenced from '_main' in hello.cpp:510
hello.cpp line 510

Error : Undefined symbol: '__stdcall(4) glutReshapeFunc (_glutReshapeFunc@4)'
referenced from '_main' in hello.cpp:511
hello.cpp line 511

Error : Undefined symbol: '__stdcall(4) glutMouseFunc (_glutMouseFunc@4)'
referenced from '_main' in hello.cpp:512
hello.cpp line 512

Error : Undefined symbol: '__stdcall(4) glutMotionFunc (_glutMotionFunc@4)'
referenced from '_main' in hello.cpp:513
hello.cpp line 513

Error : Undefined symbol: '__stdcall(8) glutAddMenuEntry (_glutAddMenuEntry@8)'
referenced from '_main' in hello.cpp:517
referenced from '_main' in hello.cpp:518
referenced from '_main' in hello.cpp:521
referenced from '_main' in hello.cpp:523
hello.cpp line 517

Error : Undefined symbol: '__stdcall(8) glutAddSubMenu (_glutAddSubMenu@8)'
referenced from '_main' in hello.cpp:522
hello.cpp line 522

Error : Undefined symbol: '__stdcall(4) glutAttachMenu (_glutAttachMenu@4)'
referenced from '_main' in hello.cpp:525
hello.cpp line 525

Error : Undefined symbol: '__stdcall(0) glutMainLoop (_glutMainLoop@0)'
referenced from '_main' in hello.cpp:527
hello.cpp line 527

05-02-2004, 02:37 PM
Sorry for the dual post. It did not seem to go through correctly. TM

chowe6685
05-02-2004, 05:54 PM
you are not linking with the glut library