Author Topic: looking for a dll  (Read 10165 times)

Offline 3DModelerMan

  • Multiple posting newcomer
  • *
  • Posts: 21
looking for a dll
« 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.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: looking for a dll
« Reply #1 on: September 14, 2008, 06:11:36 pm »
Yes

On Windows, the PATH system variable can be set to where to find the DLL.

Tim S
« Last Edit: September 14, 2008, 06:42:50 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9592
Re: looking for a dll
« Reply #2 on: September 15, 2008, 08:53:31 am »
You can also setup in the project options that the application runs in the folder where the DLL's are.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline 3DModelerMan

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: looking for a dll
« Reply #3 on: September 17, 2008, 11:21:44 pm »
Okay thanks, I'll do that.

Offline 3DModelerMan

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: looking for a dll
« Reply #4 on: September 19, 2008, 05:13:32 pm »
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.

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: looking for a dll
« Reply #5 on: September 19, 2008, 05:31:10 pm »
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).

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: looking for a dll
« Reply #6 on: September 19, 2008, 05:36:58 pm »
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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline 3DModelerMan

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: looking for a dll
« Reply #7 on: September 19, 2008, 07:27:57 pm »
oh, thanks.

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: looking for a dll
« Reply #8 on: September 20, 2008, 02:30:56 am »
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

Offline 3DModelerMan

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: looking for a dll
« Reply #9 on: September 20, 2008, 11:48:16 pm »
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?.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: looking for a dll
« Reply #10 on: September 21, 2008, 12:12:27 am »
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
« Last Edit: September 21, 2008, 12:28:26 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline J!M!

  • Single posting newcomer
  • *
  • Posts: 5
Re: looking for a dll
« Reply #11 on: September 21, 2008, 09:57:15 pm »
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!

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: looking for a dll
« Reply #12 on: September 21, 2008, 10:12:43 pm »
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
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline J!M!

  • Single posting newcomer
  • *
  • Posts: 5
Re: looking for a dll
« Reply #13 on: September 21, 2008, 10:19:05 pm »
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]

Online stahta01

  • Lives here!
  • ****
  • Posts: 6800
    • My Best Post
Re: looking for a dll
« Reply #14 on: September 21, 2008, 10:25:50 pm »
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
« Last Edit: September 21, 2008, 10:29:05 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org