I'm attempting to build OpenSceneGraph-3.2.1-rc1 with Visual Studio C++ 2010 Express w/ Service Pack 1
The linking error on building the "osg" project: Code: 1>------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------ 2>------ Build started: Project: osg, Configuration: Debug Win32 ------ 2>LINK : warning LNK4044: unrecognized option '/lopengl32.lib'; ignored 2>LINK : warning LNK4044: unrecognized option '/lopengl32.lib'; ignored 2> Creating library C:/wichtman/projects/OpenSceneGraph/osg-3.2.1-rc1-build/lib/osgd.lib and object C:/wichtman/projects/OpenSceneGraph/osg-3.2.1-rc1-build/lib/osgd.exp 2>AlphaFunc.obj : error LNK2019: unresolved external symbol __imp__glAlphaFunc@8 referenced in function "public: virtual void __thiscall osg::AlphaFunc::apply(class osg::State &)const " (?apply@AlphaFunc@osg@@UBEXAAVState@2@@Z) 2>View.obj : error LNK2001: unresolved external symbol __imp__glDrawArrays@12 ... Lots more ... 2>C:\wichtman\projects\OpenSceneGraph\osg-3.2.1-rc1-build\bin\osgd.dll : fatal error LNK1120: 109 unresolved externals ========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== If I manually change the project properties Linker -> Input -> Additional Dependencies mention of "-lopengl32.lib" to "opengl32.lib" all of my linking problems go away and the build is successful. My question is, what am I doing wrong such that I need to change this for the default projects cmake creates and/or what cmake flags do I need to set/change so that it uses "opengl32.lib" instead of "-lopengl32.lib" when generating these projects? More details: 32-bit Debug Build (I'll also make a Release build later) CMake flag changes: CMAKE_CXX_FLAGS /D "WIN32;_WIN32;_DEBUG" VS C++ "osg" Project Changes: C/C++ -> Code Generation -> Runtime Library to /MDd for (because of debug build, otherwise lots of, "unresolved external symbol __imp___CrtDbgReportW") Added /EHsc to the compiler command line to not get all of the exception warnings Any help would be appreciated as I'm new to both cmake and OpenSceneGraph.[/code] ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=57711#57711 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org