Mixing VC8 and VC9 Libs allowed?

Get answers to all your basic programming questions. No Ogre questions, please!
Post Reply
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Mixing VC8 and VC9 Libs allowed?

Post by KungFooMasta »

While I would like to build everything in vs2008 (VC9), the PhysX SDK is built with vs2005 (VC8). Would this cause any problems, using all vc9 compiled libs and used in combination with this vc8 lib?
Creator of QuickGUI!
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

I'm assuming you're trying to use a vc8 dll (with provided .lib) with a vc9 application.
Last time i tried (yesterday), yes it was a problem as the vc8 lib file (provided with a dll) was not readable by vc9. (link error)

BUT before i tried, i though there was no problem as the .lib format would'nt have changed between versions, and i though i did this fine before.
So only one of the following is true :
1) I did something wrong;
2) I was wrong, the .lib format has changed between vc8 and vc9;
3) It depends on the content of the .lib or the way the .lib was generated;

Now, as i don't find just now the real answer on the net, maybe this site can help?
reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Post by reptor »

I use Visual C++ 2008 Express Edition and PhysX.

I didn't notice any problems. Compiles and links fine.

But my application is relatively simple, so there can be some run-time problems? But I didn't encounter any this far.

If the problem would be purely a linking-time problem, then I can say I have not had any problems.
Last edited by reptor on Fri Oct 03, 2008 11:55 pm, edited 1 time in total.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

Usually, a C library should be compatible between different compiler versions. You can even use DLLs generated by VS with MinGW and vice versa. C++ libs, however, must be matched with the exact same compiler that was used to generate them.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

Aaaaah yes that's why i though i did this before, it was with a C lib so the compatibility is always right.
reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Post by reptor »

Erm, are you saying that it is not possible to use PhysX with Visual C++ 2008 Express Edition? :?

(I have used it so it is possible. Am I misunderstanding something horribly here?)
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

I asked help there http://stackoverflow.com/questions/1718 ... patibility

I can't find the microsoft page about lib compatibility, but i'm sure i've seen that before...
reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Post by reptor »

Here

http://developer.nvidia.com/forums/inde ... ost&p=6219

a person from nvidia says that VS2008 should be OK.


I think of course it is OK, because I already used PhysX with VS2008 without problems :) but couln't be totally sure if there aren't some "hidden" problems.
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Thanks for the information all. I guess Klaim's last link exposes a somewhat serious problem. I'll probably just wait it out, hopefully PhysX offers a vc9 sdk soon.
Creator of QuickGUI!
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

Yep it don't seem officially supported...
reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Post by reptor »

But why doesn't nvidia say that the PhysX SDK should be used with VS2005? I haven't seen any recommendation to do that from ageia/nvidia.

I think if that was important, it would be made clear in the documentation. In fact they go to the other direction, as I see it.

The documentation says, in Installation & Deployment - Compiler Setup that "If you are using a compiler other than VC++ 7 or 8, or if you would like to create a new project using the SDK, set it up as follows:"

Then add to that the comment made by the nvidia employee which I referenced in my previous post.
reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland
x 5

Post by reptor »

And what kind of problems are you expecting? I have had zero problems with PhysX this far when using it together with libraries compiled with VS2008.
User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
x 56
Contact:

Post by Klaim »

I don't expect problems, all it seems you have to know is that there are cases where it just don't work (for some obscure reasons). So if it works with the PhysX dll, then it's a good thing.

I would have been happy if it worked with some other lib i use...
Post Reply