| | |
stdlib.h error?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
Hello everyone,
got a really strange and annoying error. When i compile my program i get 2 errors and 2 warnings all 4 to do with stdlib.h
error C2381: 'exit' : redefinition; __declspec(noreturn) differs c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h 371
i did a little research on the problem and found it was something to do with a conflict between glut and stdlib so i did what they asked me to do add GLUT_BUILDING_LIB to the preprocessors.
compiled again this time with 72 errors and 11 warnings
all 72 of the errors are linking errors
Error 61 error LNK2019: unresolved external symbol _glutIdleFunc@4 referenced in function "private: void __thiscall Viewer::GLInit(void)" (?GLInit@Viewer@@AAEXXZ)
i'm really stumped as to what needs to be done
-midi
got a really strange and annoying error. When i compile my program i get 2 errors and 2 warnings all 4 to do with stdlib.h
error C2381: 'exit' : redefinition; __declspec(noreturn) differs c:\program files\microsoft visual studio 9.0\vc\include\stdlib.h 371
i did a little research on the problem and found it was something to do with a conflict between glut and stdlib so i did what they asked me to do add GLUT_BUILDING_LIB to the preprocessors.
compiled again this time with 72 errors and 11 warnings
all 72 of the errors are linking errors
Error 61 error LNK2019: unresolved external symbol _glutIdleFunc@4 referenced in function "private: void __thiscall Viewer::GLInit(void)" (?GLInit@Viewer@@AAEXXZ)
i'm really stumped as to what needs to be done
-midi
From what i am understanding adding this
GLUT_BUILDING_LIB
Fixed the original problem. Now you are trying to compile glut code. To do this not only do you need to include the header files but also the library files....you need to tell the linker which library files it will need.
Chris
GLUT_BUILDING_LIB
Fixed the original problem. Now you are trying to compile glut code. To do this not only do you need to include the header files but also the library files....you need to tell the linker which library files it will need.
Chris
Knowledge is power -- But experience is everything
•
•
•
•
From what i am understanding adding this
GLUT_BUILDING_LIB
Fixed the original problem. Now you are trying to compile glut code. To do this not only do you need to include the header files but also the library files....you need to tell the linker which library files it will need.
Chris

oh well gotta learn sometime.
thanks again
![]() |
Similar Threads
- visual c++ strange compile error... (C++)
- c language problm, how to pass pointer to a function (C)
- General Protection Exception Error Please Help! (C++)
- help me find the error (C++)
- Error in c++ program (C++)
- Help with error checking code (C++)
- DECLARATION SYNTAX ERROR (for bc 31 user) (C++)
- pow: DOMAIN error (C++)
- struct error (!?) (C)
Other Threads in the C++ Forum
- Previous Thread: one event handler function for a number of messages - MFC
- Next Thread: Settings in Application (C++)
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings struct temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





