osghxl wrote:
hi,Paul Martz
Your reply is blank,I hope you can give me some advice.
Thanks
regards,
houxl
Interesting... In my 'sent' folder it appears fine. I've cut and pasted
my reply below. This time sending as plain text.
-Paul
I have not compiled osgEphemeris, but based on my experience using VS, I
believe the "see previous definition" message indicates you are
#including some header files multiple times, and for some reason they
are not wrapped with "#pragma once" (or an equivalent CPP trick).
The "inconsistent DLL linkage" warning is an indication of either static
versus dynamic confusion, or the wrong kind of C runtime library. Check
to make sure the C runtime is set to Debug Multithreaded DLL (for debug
builds) and Multithreaded DLL (for release). If osgEphemeris uses
external dependencies, make sure they were built the same way. Finally,
check to see what the build type of your osgEphemeris project file is,
and make sure it is a DLL and not a static lib.
The "dllimport static" error sounds like a declaration issue. Many
projects (including OSG) use a CPP symbol as a prefix to class and
function names to be exported from a DLL. It's defined as "declspec(
dllexport )" when building the DLL, and "declspec( dllimport )" when
building an external app that uses the DLL. You should look for such a
symbol and verify it is being defined correctly. The symbol should be
defined as nothing only for non VS builds (like OS X or Linux), or if
specifically building a static lib.
If you put all this together, then I'd guess you are #including a header
twice, once using dllimport declarations and once again as dllexport.
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
+1 303 859 9466
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org