Jump to content
  • Advertisement
Sign in to follow this  
Drezard

DLL Problems

This topic is 3651 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

I'm trying to learn about all the wonders of DLLs currently and creating them using VC++ 2008. Now... I have successfully created my first .dll and linked it and got it working with my first project. BUT.... When I run it on my computer it works like a charm, i can change the directory that the files are located (aslong as the .dll and .exe stay in the same directory) and it still works. But as soon as I swap it over to another PC, it fails when I try and run the .exe and gives the... "This application failed to start because the application configuration is incorrect. Reinstalling this application may correct the problem." I think its caused by my linking. In the .exe project, i linked the .dll by going into Project Settings > Configuration > Linker > General and then setting the "Additional Library Directories" to the macro "$(TargetDir)" and then going into Linker > Input under "Additional Dependencies" I put in "Operations.lib" (the name of my DLL is "Operations.dll"). No %#include <operations.h> in the application code. Any ideas whats wrong? Is the way I'm linking or another problem??? Thanks, Daniel

Share this post


Link to post
Share on other sites
Advertisement
Does it work if you just have the EXE without a DLL? Sounds to me like you haven't installed the VC++ runtimes on the other PC.

Share this post


Link to post
Share on other sites
Is there a way I can do it without installing the runtimes on the other PCs?

Gives same error if I try and run it without the dll in the same folder...

Share this post


Link to post
Share on other sites
Quote:
Original post by Drezard
Is there a way I can do it without installing the runtimes on the other PCs?
No*

* Yes, but it's a hell of a lot more hassle (It involves writing your own CRT libraries). Another alternative would be to statically link to the CRT, but that has it's own problems (Such as a massively increased EXE size).

I'd suggest just directing people to the online redist. package.
EDIT: Or the equivalent one for the version of Visual Studio you use.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!