Results 1 to 6 of 6

Thread: Collada DOM using VC9

  1. #1
    Junior Member
    Join Date
    May 2008
    Posts
    2

    Collada DOM using VC9

    Hi,

    I just tried to build (debug version) my own application using collada dom statically linked library, and during this procedure I experienced a lot of link errors. However, during DOM library build, I had absolutely no problems.

    I have follwed the instructions from [i]http://www.collada.org/mediawiki/ind...de:_Setting_up
    However, it seems that this is not all, or I am doing something terribly wrong???


    This is what I got after first tries to build my application:

    1) a series of: MSVCRT.lib(MSVCR90.dll) : error LNK2005: __vsnprintf already defined in libcmtd.lib(vsnprint.obj)
    ...
    ...
    2) I introduced in Link->Inputs->Ignore Specific Library: msvcrt;msvcprtd; msvcrtd

    3) NowI still have a lot of link errors:

    a) zlib.lib(gzio.obj) : warning LNK4049: locally defined symbol __vsnprintf imported

    b) libxml2_a.lib(xmlreader.obj) : warning LNK4217: locally defined symbol __vsnprintf imported in function _xmlTextReaderBuildMessage
    ...
    ...
    ...

    c) libxml2_a.lib(xmlIO.obj) : error LNK2019: unresolved external symbol __imp___wfopen referenced in function _xmlWrapOpenUtf8
    ...
    ...
    ...

    and lot of others....


    Can anybody help me with this, please ?

    Thanks,
    Alex

  2. #2
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    So you're using VS 2008 it looks like? Make sure you're using DOM 2.1 or later. DOM 2.0 had problems with its support for VS 2008.

    Let me try building an app that uses the vc9 DOM static lib. I'll report back with my findings.

  3. #3
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    It worked fine for me. Are you sure you're linking against the vc9 versions of the external libs? Some of the external libs (eg libxml) use the same lib for both vc8 and 9, whereas some (eg PCRE) require different libs between vc8 and 9.

    This problem is explained in a note in the setting up guide: "In several paths below you'll see "vc8" used. That's for Visual C++ 8 (Visual Studio 2005). If you're using Visual C++ 9 (Visual Studio 200, substitute "vc9" for "vc8" everywhere." It's somewhat easy to overlook that note unfortunately.

  4. #4
    Junior Member
    Join Date
    May 2008
    Posts
    2
    Thanks for your efforts!

    I just checked. All paths seem to be correct (pointing to VC9). But still the same outcome. I will try to go thru this procedure one more time, to be sure that nothing is missing.

  5. #5
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    I googled the error message you're getting and it seems it might be caused by linking against the wrong version of the C runtime. Make sure you're linking against the "multi-threaded debug DLL" (/MDd) in the debug build and the "multi-threaded DLL" (/MD) in the release build. This setting is available in project properties --> C/C++ --> Code Generation --> Runtime Library.

    Since both vc8 and vc9 are set to use the correct runtime by default I didn't bother mentioning this in the setting up guide, but maybe I should add a note.

  6. #6
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    Also, the only library you should have in the "ignore specific library" field is msvcrt, and only in the debug build.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •