Distributing with DLLs
Hi.
I want to distribute Binary versions of a program and don''t know how I can add the path to runtime libraries to the project.
It only works (compiling and running it) if the DLLs are in the same directory as the exe file.
I want to put them in a subfolder though.
I use Dev-C++ but I think a general answer would help.
Where do I have to look / what do I have to change?
This is a bit fo a guess but I think you might be able to do it via dynamic linking and LoadLibrary() - something like LoadLibrary("SubFolder/MyDll.dll"), not sure if it''s possible via static linking.
I think I don''t understand compilers well enough.
Maybe because the main function is handled by SDL it is not possible to use LoadLibrary?
I can compile the program but it doesn''t make a difference.
(SDL.dll was not found)
Guess I''ll have to put them into the root directory :/
---
Tolop|Andyart.de
Maybe because the main function is handled by SDL it is not possible to use LoadLibrary?
I can compile the program but it doesn''t make a difference.
(SDL.dll was not found)
Guess I''ll have to put them into the root directory :/
---
Tolop|Andyart.de
If I remember right, without LoadLibrary(), Windows looks first in the directory where the exe is, then in the Windows directory, then in the Windows/System (or System32) directory, then searches your PATH variable.
If you want it to reside someplace else, you have to use LoadLibrary(). But, with SDL, that probably isn''t an option.
If you want it to reside someplace else, you have to use LoadLibrary(). But, with SDL, that probably isn''t an option.
quote:Original post by Ranger50000
You guys are over complicating this. ("SubFolder/MyDll.dll"), is wrong haven''t you ever referenced a file by name in c++? It should be ("subfolder\\mydll.dll"). Its always double backslashes, and making all of your files lower case is smart too.
Actually, Windows handles forward slashes just fine. And on Win2K/WinNT/WinXP, upper-case, lower-case, and mixed-case filenames map to the same name.
quote:Original post by Dave Huntquote:Original post by Ranger50000
You guys are over complicating this. ("SubFolder/MyDll.dll"), is wrong haven''t you ever referenced a file by name in c++? It should be ("subfolder\\mydll.dll"). Its always double backslashes, and making all of your files lower case is smart too.
Actually, Windows handles forward slashes just fine. And on Win2K/WinNT/WinXP, upper-case, lower-case, and mixed-case filenames map to the same name.
Actually, that worked on all Windows versions out there(At least 95+). And using / is much better, because if you want to develop crossplatform Linux hates \\.
Toolmaker
My site
/* -Earth is 98% full. Please delete anybody you can.*/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement