Hi im using 9800GT as my primary device and 9500GT on PCI bus for display. Im trying to use Open GL to speed up display mode. The program compiles but it seems like I have conflict between libraries. Following is my errors
Linking…
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _printf already defined in LIBCMT.lib(printf.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>LINK : warning LNK4098: defaultlib ‘MSVCRTD’ conflicts with use of other libs; use /NODEFAULTLIB:library
1>Resampling_GL.obj : error LNK2019: unresolved external symbol _glutPostRedisplay referenced in function “void __cdecl display(void)” (?display@@YAXXZ)
1>Resampling_GL.obj : error LNK2019: unresolved external symbol _glutSwapBuffers referenced in function “void __cdecl display(void)” (?display@@YAXXZ)
1>Resampling_GL.obj : error LNK2019: unresolved external symbol _glutMainLoop referenced in function _main
1>Resampling_GL.obj : error LNK2019: unresolved external symbol _glutDisplayFunc referenced in function _main
1>C:\Users\RETINALOCT2\Desktop\Jay\ OCT Processor\gpu_testers\Resampling_GL\Debug\ Resampling_GL.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at “file://c:\Users\RETINALOCT2\Desktop\ Jay\OCT Processor\gpu_testers\Resampling_GL\Resampling_GL\ Debug\BuildLog.htm”
1>Resampling_GL - 11 error(s), 9 warning(s)
Since Im running Open GL on .cpp file which should be multithread program, I should use libcmt.lib and ignore those listed on the link bellow.
Linker Tools Warning LNK4098 | Microsoft Learn
However, I havent found any ways to ignore those libraries which seems to be default libraries supplied by microsoft. Can somebody help me with this? My short experience make me impossible to solve the problem. Thank you