OSG Learning Examples encounter problems four-bone animation compilation osgcal
Transferred from: http://blog.csdn.net/wuwangrun/article/details/8239451
Today learned the book "OpenSceneGraph Three-dimensional rendering engine Programming Guide" Skeleton animation example, encountered the compilation osgcal problem, the book is not detailed, the Internet to find the relevant article
Http://www.cnkinect.com/thread-15697-1-1.html
Write is quite complete, I follow the basic no big problem, here oneself in his article based on re-collation summed up
1, compile Cal3d, the purpose is to get cal3d_d.lib, Cal3d_d.dll and Cal3d.lib,cal3d.dll, the subsequent compilation osgcal rely on the Cal3d library file (in this case, only the library file, dynamic library is only an appendage).
1.1, Cal3d source access, through SVN access to the latest source code, the latest source:
Http://svn.gna.org/svn/cal3d/trunk. The downloaded source file contains the following three folders
1.2, open Cal3d, find Cal3d.sln, open the project, including 12 projects, here we only need Buildcal3d project, select the project, right click, in the pop-up box, select Build, click. Wait a few minutes for debug and Releas under the bin file to get Cal3d_d.lib, Cal3d_d.dll (debug mode) and Cal3d.lib, Cal3d.dll (release mode).
1.3, in the Cal3d directory new lib, include, Bin folder, the Cal3d_d.dll, Cal3d.dll copy to the bin file; Cal3d_d.lib, Copy the Cal3d.lib to the Lib folder, and copy all src files to the Include folder. The preparation for compiling the osgcal here is complete.
2, compile osgcal, compile osgcal is to get OsgCald.dll, OsgCald.lib and OsgCal.dll, OsgCal.lib (behind with D is in debug mode, not with the release mode).
2.1, SVN access to the latest source code, the latest source to obtain the address:
Https://osgcal.svn.sourceforge.net/svnroot/osgcal/trunk/osgCal
2.2. Open CMake, generate osgcal solution. Drag CMakeLists.txt under the osgcal file to CMake 2.8.7.
Click Configure to select the compiled environment
2.3, the following requirements, configuration parameters.
That's the point. The Include path and LIB files here are almost always manually added to the past.
To explain several important parameters, the other parameters are modified by themselves:
Path to the INCLUDE file for Cal3d_include_dir Cal3d (e:/cal3d/cal3d/include)
Cal3d_library cal3d lib file (e:/cal3d/cal3d/lib/cal3d_d.lib)
Open_threads_include_dir
Include path for openthreads
(d:/osgsdk/openscenegraph-2.8.2/include/openthreads)
Open_threads_libtary
Openthreads's lib Path (D:/osgsdk/openscenegraph-2.8.2/lib/openthreads)
Osg_include_dir
OSG include file path (d:/osgsdk/openscenegraph-2.8.2/include)
Osg_library
Osg lib file (d:/osgsdk/openscenegraph-2.8.2/lib/osg.lib)
2.4, after the configuration of the parameters, the second click Configure.
After determining the error, click Generate, Show configuring done, indicate that the configuration was successful and the solution will be built.
Note: The Include and LIB paths here are consistent with the include and LIB paths of Tools-options-projects and solutions-c++ directories under the Osgcal project. If these include and LIB paths are not added in CMake (provided generating done), it is also possible to add the include and LIB paths in the project. Warnings are allowed in cmake, but there is no error, otherwise the compilation will not go away.
2.5, open the OsgCal.sln solution, Note: Check Tools-options-projectsand solutions-c++ directories the include and Lib path is correct. Build All_build. Wait more than 10 minutes and display 6 succeeded,0 Faild, indicating that the compilation was successful.
I encountered an unresolved error at compile time, and I added the Lib dependency Cal3D.lib under the project properties that encountered the problem, and then compiled it successfully.
2.6, copy OsgCald.dll, osgCal.dll to Bin file, OsgCald.lib, OsgCal.lib copy to Lib folder.
After arduous hardships, finally got the need of OsgCald.dll, OsgCal.dll and OsgCald.lib, OsgCal.lib.
2.7. Configure Osgcal Environment
Put the included osgcal under Osgcal in the include that was previously compiled OSG. The corresponding DLLs and Lib are also placed in the corresponding directory, so that the environment variables are not configured. You can start running the example.
Note: Finally, if the problem is mostly the environment configuration problem, I was to use all of the include DLL Lib are put together, including for the compilation of osgcal generated Cal3d dll lib, so that no additional environment variable path God horse's
OSG Learning Examples Encounter problems four-bone animation compilation osgcal