Windows (Visual Studio)
Compiling DOM
solution files and projects in Visual Studio directory
[Sun-path] \\ projects
and include the project files for VS 2005 and VS 2008.
dom.sln Open the file and compile the project Sun
dynamic library for the DLL version, or compile the project dom-static
to get a static library LIB.
Whatever type you choose, the compiler will be placed in the folder \\ build
.
Compiling client applications
will happen, below, to see "vc8" in different ways: those are for Visual C + + 8 (Visual Studio 2005), if you're using Visual C + + 9 (Visual Studio 2008) , replace "VC9" a "vc8" in all respects in which it appears.
will happen also to see "1.4" and "14", referring to COLLADA 1.4.
If you are using COLLADA 1.5, replace it with "1.5" and "15."
Project Settings
Change project settings, select the menu Project -> Properties .
All settings that affect us are in the Configuration Properties menu .
Set the directory of the headers
expand the menu C / C + + add the item Additional Include Directories the following files:
\\ include
\\ include \\ 1.4
\\ external-libs \\ boost
Set preprocessor directives
In a Sun or dom-static , add these directives to the voice Preprocessor menu C / C + +:
BOOST_ALL_NO_LIB
PCRE_STATIC
DOM_INCLUDE_LIBXML
Linking with static library
Select menu Linker and add the following lines in Additional Library Directories:
\\ build \\ vc8-1.4 (release) or \\ build \\ vc8-1.4-d (debug)
\\ external-libs \\ libxml2 \\ win32 \\ lib
\\ external-libs \\ pcre \\ lib \\ vc8
\\ external-libs \\ minizip \\ win32 \\ lib \\
\\ external-libs \\ boost \\ lib \\ vc8
Add the following lines in the menu under Input Additional Dependencies
libcollada14dom22-s.lib (release) or libcollada14dom22-sd.lib (debug)
libxml2_a.lib
zlib.lib
wsock32.lib
pcre.lib (release) or pcre-d.lib (debug)
pcrecpp.lib (release) or pcrecpp-d.lib (debug)
minizip.lib (release) or minizip-d.lib (debug)
libboost_filesystem.lib (release) or libboost_filesystem-d.lib (debug)
libboost_system.lib (release) or libboost_system-d.lib (debug)
Warnings and errors at runtime linker
filling out an application that links the static library you could get into this warning:
LINK: warning LNK4098: defaultlib 'MSVCRT' Conflicts with use of other libs; use / NODEFAULTLIB: library
Ignoring the warnings you encounter an error at runtime like this:
This application has failed to start Was Because MSVCR80.dll not found. ...
If you encounter this problem go to the voice Ignore specific library Linker menu and add msvcrt.
Recompile and warnings should disappear and the application work.
0 comments:
Post a Comment