Jump to content
  • Advertisement
Sign in to follow this  
nammour

static libraries and dlls VC++ with VS2005

This topic is 3854 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i am so exhausted from this thing. I have a project which was developed with VC6, so i convert it to VS2005. But there was some errors about some functions that became useless in VS2005 (like _export in VC6 become __declspec(dllexport) in VS2005). This problem (conversion errors) is resolved. But the main problem is that when i debug the project, the .exe could not found a specific dll (ICE_API.dll) but it is building successfully because it reads functions from a static library (ICE_API.lib) and there is the header file (ICE_API.h). But i cannot export the functions that exists in the header file because i cannot read them from the static library. So its not about dllexport or something because when we use __declspec(dllexport) we have to write the function by myself which i cannot because this function exists in the static library (ICE_API.lib). Please it passed a week and i am trying to build a dll file by using the static library so the functions this (lib file) will be exported to the dll without knowing how these functions (that their names are declared this ICE_API.h) are written. Thank You. [Edited by - nammour on April 2, 2008 4:26:50 AM]

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure I understand. If you have a dependency on a DLL - ICE_API.dll in this case - you should just ship it with your executable. Have you tried placing the relevant dll in the same folder as your executable?

Share this post


Link to post
Share on other sites
If you have a .lib file for VC6, you need a different .lib file for VC2005. As far as I know they aren't compatible.

Also, as Sc4Freak said, you can't pull the functions out of ICE_API.dll and into your own DLL if that's what you're trying to do.

Share this post


Link to post
Share on other sites
This is all a little bit confused, I'm not entirely sure what you're trying to do... If you have the header containing the function prototypes then it should be a trivial matter to convert them to the updated syntax. Don't forget that you use __declspec(dllexport) to EXPORT functions from a DLL and __declspec(dllimport) to IMPORT functions back in from a DLL. Also, if your app can't find the DLL it may be a search path problem.

Quote:
Also, as Sc4Freak said, you can't pull the functions out of ICE_API.dll and into your own DLL if that's what you're trying to do.

Actually there's a tool around called DLL to Lib that'll get you halfway to achieving that.

Jans.

Share this post


Link to post
Share on other sites
Quote:
Original post by Jansic
Quote:
Also, as Sc4Freak said, you can't pull the functions out of ICE_API.dll and into your own DLL if that's what you're trying to do.

Actually there's a tool around called DLL to Lib that'll get you halfway to achieving that.
Interesting, I didn't know about that. I knew it was possible (Although extremely ugly, since it's pulling the DLL apart) to get the contents of one DLL into another, I didn't think DLL -> lib was possible.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!