问题
I am trying to port a (very) old project of mine from Visual Studio 6 to Visual Studio 2010.
The project is an OpenGL application, and as such, it uses the following libraries (amongst others):
- glu32.lib
- glui32.lib
- glut32.lib
- opengl32.lib
The glui32.lib
library links the libcd.lib
library, which is not supported on Visual Studio 2010.
So I need to find a version of the glui32.lib
library, which links the libcmtd.lib
library instead.
My questions are:
- Is there any such version of the
glui32.lib
library? - If yes - where can I download it?
- If no - can I use the
libcd.lib
library on Visual Studio 2010? - If yes - where can I download it?
- If no - is there any other way for me to solve this linkage error?
UPDATE
I'm leaving the answer below as the accepted one, but here is a workaround for porting an OpenGL project from Visual Studio 6 to Visual Studio 2010 (after creating the project in Visual Studio 2010):
- Right click the project and choose Properties.
- Open Configuration Properties --> C/C++ --> Preprocessor.
- In the Preprocessor Definitions entry, add GLUT_BUILDING_LIB.
- In the Runtime Library entry, choose Multi-threaded (/MT) or Multi-threaded Debug (/MTd).
- Open Configuration Properties --> Linker -->Input.
- In the Additional Dependencies entry, add glu32.lib;glui32.lib;glut32.lib;opengl32.lib.
- In the Ignore Specific Default Libraries entry, add libcd.lib.
回答1:
You can rebuild GLUI. The MSVS project they ship converts without issue to VS2010.
You will have to point it at your GLUT build though.
来源:https://stackoverflow.com/questions/21945354/linkage-error-with-glui32-lib-and-libcd-lib-on-visual-studio