[osg-users] Compiling VRML 2.0 Plugin (Visual Studio 8)
jean-sebastien.guay at polymtl.ca
Mon Oct 1 13:53:24 PDT 2007
> I have been trying to compile the VRML 2.0 plugin under VS8. I have
> noticed a number of posts on the forum about the plugin but I cannot
> seem to find anybody having issues with it's compilation under
> visual studio v8.0.
I regularly compile OSG with the OpenVRML plugin under VS8 (in my
case, Visual C++ 2005 Express Edition, but functionally equivalent to
Visual Studio 2005). There have been some fixes lately to make the
right OpenVRML libraries link, which seems to be related to the errors
you are getting. What version of OSG are you trying to compile?
I believe the latest fixes went into 2.1.13, so if you're using a
previous version, either update to the latest (2.1.13 or straight from
SVN) or you'll have to do some manual tweaking to your project files.
And you're right, linker errors like those you're getting are either
because the library is not found or they're compiled against the wrong
Visual C++ runtime. In particular, the linker errors you're getting
suggest that you're missing antlr.lib (and probably also regex.lib) in
the "plugins vrml" project's Linker - Input - Additional Dependencies
setting. In the debug configuration, it should be openvrmld.lib,
antlrd.lib and regexd.lib . The changes done lately would set the
right libraries automatically when generating the project files with
CMake, but if you don't want to update, you need to do it manually.
I'll add a note in the instructions you read.
> I assume that I the libraries are the correct version as i got them
> from the suggested link, and I've added the OpenVRML lib dir to both
> CMake and the .NET lib search path, but alas, i get still get these
> blasted errors.
Apart from what I said above, after following the instructions, you
should have your own compiled libraries in a separate directory.
That's the directory you need to point CMake to. You cannot compile
the OSG OpenVRML plugin using the versions of the libs that come
precompiled in the zip you downloaded, that will get you lots of
errors because they are linked to the wrong Visual C++ runtime.
So, make sure you're linking to the three libraries (openvrml.lib,
antlr.lib, regex.lib), make sure you're linking to your own versions
of the libs, and make sure you're linking to the right versions
depending on the configuration ('d' suffix for debug, no suffix for
Jean-Sebastien Guay jean-sebastien.guay at polymtl.ca
This message was sent using IMP, the Internet Messaging Program.
More information about the osg-users