Thanks Marcin and J-S -- Changing this file so that libraries always use '.lib' fixes this problem for me.
I don't know why the file tries to specify a different extension for IDE vs non-IDE, nor do I know how this worked using CMake 2.4.x. Should we just submit this as a fix and see who screams? -Paul > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Marcin Prus > Sent: Thursday, May 08, 2008 4:38 AM > To: osg-users@lists.openscenegraph.org > Subject: Re: [osg-users] OSG 2.4, CMake 2.6 and Visual C++ > 2008: Missing .lib extension for internal dependencies causes > linker error > > Hi Thomas, > > If you replace ln. 33 in CMakeModules/OsgMacroUtils.cmake > TARGET_LINK_LIBRARIES(${TRGTNAME} optimized > "${OUTPUT_LIBDIR}/${LINKLIB}" debug > "${OUTPUT_LIBDIR}/${LINKLIB}${CMAKE_DEBUG_POSTFIX}") > with something like in ln. 31 > TARGET_LINK_LIBRARIES(${TRGTNAME} optimized > "${OUTPUT_LIBDIR}/${LINKLIB}.lib" debug > "${OUTPUT_LIBDIR}/${LINKLIB}${CMAKE_DEBUG_POSTFIX}.lib") > OSG will build properly. > > I'm not CMake expert and I don't know why there is a > difference for IDE and nonIDE MSVC project generation in > CMake macros but with this fix OSG builds with no problems. > > Marcin > > > Hello everyone, > > > > Compiling OSG 2.4 on Windows Vista 32bit with CMake 2.6 and Visual > > C++ 2008 all latest versions, I have noticed that the > projects that > > depend on other solution internal projects (such as osg depends on > > OpenThreads) all fail to link with a similar error to this > for all of > > the internal dependencies (not just OpenThreads as in this > example): > > > > "3>LINK : fatal error LNK1181: input file > "..\..\lib\OpenThreads.obj" > > cannot be opened." > > > > Notice the .obj extension - turns out in the project > linker options, > > all additional dependencies are specified correctly with the > > extension .lib but the internal for example osgUtil: > > > > $(NOINHERIT) kernel32.lib user32.lib gdi32.lib winspool.lib > > shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib > advapi32.lib > > ..\..\lib\osgd ..\..\lib\OpenThreadsd glu32.lib opengl32.lib > > > > Notice again the extension .lib is missing for the > solution internal > > dependencies. > > > > Could anyone let me know if this is likely a > misconfiguration of mine > > or if this really is a bug that should be addressed/fixed > in the next > > release of the OSG library? > > > > Thanks, > > Thomas > > > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > > org > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org