Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: 3DModelerMan on September 14, 2008, 05:13:38 pm
-
Hi, I was wondering if there was a way I could change the directory the application searches for dll's in?.
Thanks :D.
-
Yes
On Windows, the PATH system variable can be set to where to find the DLL.
Tim S
-
You can also setup in the project options that the application runs in the folder where the DLL's are.
-
Okay thanks, I'll do that.
-
I looked in the project settings and the build options areas but could'nt find the path variable.
Could someone point me to it?.
Thanks.
-
Yes
On Windows, the PATH system variable can be set to where to find the DLL.
Tim S
As Tim wrote it's a system variable.
You can e.g. google for :"how to set path on windows" (gives me more then a million responses).
-
I looked in the project settings and the build options areas but could'nt find the path variable.
Could someone point me to it?.
Thanks.
The PATH variable is part of windows not part of Code::Blocks.
Note: The EnvVars plugin can set the window PATH variable, but I never trusted it to confirm it works.
I do use "Settings" -> "Compiler and Debugger"
Tab "ToolChain exe"
SubTab "Additional paths"
In order for Executables and DLL not created by my project can be found.
Tim S
-
oh, thanks.
-
I looked in the project settings and the build options areas but could'nt find the path variable.
Could someone point me to it?.
Thanks.
The PATH variable is part of windows not part of Code::Blocks.
Note: The EnvVars plugin can set the window PATH variable, but I never trusted it to confirm it works.
I do use "Settings" -> "Compiler and Debugger"
Tab "ToolChain exe"
SubTab "Additional paths"
In order for Executables and DLL not created by my project can be found.
Tim S
Note that this will only work properly when you run your application from within C::B.
To make it work outside of C::B, open your Control Panel, select System, then the "Advanced" tab. At the bottom is a button that says "Environment Variables". Click that and edit your PATH variable to include the directory where you DLL's exist.
Ringo
-
I just thought of something though, won't this affect the rest of my computers programs?.
I have windows XP so if my installer wrote in XP to system32 (wich is where my dll's are searched for), if the install program wrote the dll's to there would it be the same on other windows systems?.
-
I just thought of something though, won't this affect the rest of my computers programs?.
I have windows XP so if my installer wrote in XP to system32 (wich is where my dll's are searched for), if the install program wrote the dll's to there would it be the same on other windows systems?.
If your installer puts any DLLs into system32 other than windows DLLs; I hope to never use your program.
This assumes an normal program; some system utilities seem to put DLLs there, but most other programs do not.
http://en.wikipedia.org/wiki/Dll_hell
http://msdn.microsoft.com/en-us/library/ms682586.aspx
Tim S
-
I'm new to Code::Blocks.
In the systems PATH-variable I added "C:\QtOpenSource\bin", which works fine within "QDevelop". But now, in Code::Blocks the compiler just can't find Qt. (I want to build a DLL from sources which use Qt.) Why?
Btw: Why is in Project->Properties some text as black as the background, so that I can't read it?
GreezZ J!M!
-
Try adding the dll path to Code::Blocks in addition to the Windows System Variable PATH.
The method I use is to add it to Global Compiler Settings.
"Settings" -> "Compiler and Debugger"
Tab "Tool chain exe"
SubTab "Additional paths"
Tim S
-
Thx 4 your answer.
But I've already tried that without success. Check out the screenshots in the attachment.
Greezz J!M!
[attachment deleted by admin]
-
Please try it again this time use
SubTab "Additional paths"
Oops, not sure which tab is highlighted in your pic.
FYI: You also need to update the project search folders, but since that has nothing to do with finding the DLL on program execution, not sure if it needs stated.
Tim S
-
"AdditionalPaths" is highlighted.
Thatz also my 2nd problem: Why do I have a such weird color distribution?
-
Btw: Why is in Project->Properties some text as black as the background, so that I can't read it?
GreezZ J!M!
Because you selected an black background; somewhere in Code::Blocks there is an bug.
Tim S
-
Hmm.. Isn't there a patch for this? This really gets on my nerves...
But what is with my main problem? Isn't there other solution?
Ok, what I've thought: Even it is a Qt project, I've started up by making a "Dynamic Link Library"-Project. Maybe thatz the reason why C::B can't find Qt. But if then I choose "Qt Application", am I still able not to compile an .exe but a .dll, by changing build/project-options afterwards?
-
Hmm.. Isn't there a patch for this? This really gets on my nerves...
But what is with my main problem? Isn't there other solution?
Ok, what I've thought: Even it is a Qt project, I've started up by making a "Dynamic Link Library"-Project. Maybe thatz the reason why C::B can't find Qt. But if then I choose "Qt Application", am I still able not to compile an .exe but a .dll, by changing build/project-options afterwards?
Sounds more and more that you did not set the project search folder correctly, please confirm they are right.
Turn on Compiler logging and post the results.
This is done by selecting the "Full command line" option Under menu "Settings" -> "Compiler and Debugger" -> "Other Setting" tab, "Compiler logging".
What is the error?
Is it an compiler error, linker error or runtime error?
Tim S
-
WTF!
Don't know w2do.... -.-
-> screenshot
[attachment deleted by admin]
-
Instead of "Task descripting" chose "Full commandline" from the dropdown list.