C++ Compiling Question

pushVTEC

Senior member
Aug 30, 2003
265
0
0
I'm getting these errors, I kind of understand what they mean, but have no idea where I should look to fix it.

glutBase.obj : error LNK2019: unresolved external symbol ___glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8
glutBase.obj : error LNK2019: unresolved external symbol ___glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4
glutBase.obj : error LNK2019: unresolved external symbol ___glutCreateMenuWithExit@8 referenced in function _glutCreateMenu_ATEXIT_HACK@4
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
Are you including GLUT's libraries, and have you specified it in your Makefile (if you use one?)
 

pushVTEC

Senior member
Aug 30, 2003
265
0
0
Yeah it must be a dependency problem, I just ran it via vnc on my home machine and it works fine, but it refuses to run on this lab PC.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Does your lab PC have the library availible? It has to be somewhere that the linker can find it.
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
You can also just copy the libraries from your home machine and include them in with your source code, instead of using system libraries. The lab PC might have a different version that doesn't have those functions that you are trying to use.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You can also just copy the libraries from your home machine and include them in with your source code, instead of using system libraries. The lab PC might have a different version that doesn't have those functions that you are trying to use.

libglut has 13 dependencies here, if any of them are incompatible, wrong architecture, wrong ABI, etc it won't work.