Author Topic: Projects and a created DLL  (Read 3927 times)

Offline Kat B

  • Multiple posting newcomer
  • *
  • Posts: 11
Projects and a created DLL
« on: May 07, 2009, 05:01:34 am »
I am using code::blocks, and it works really well. Sometimes  it has programmer issues (me). This may be one of them. This may also be a compiler question. If it is, let me know. At this stage I think it could be something that I don't yet know about Code::Blocks.

I have a workspace that I am using and have set up, with some projects in it. One is a DLL that compiles and links and forms a .def, .dll and .a. Another project has a dependency on that dll and that compiles and links (YAY!).

However, when I try to run the second project (not the dll), it cannot run as it cannot find the DLL. Is there something I can input to code::blocks to either create another copy of the dll in the second project's folder, or can I tell the second project where to find the DLL?

Also, can I tell Code::Blocks to also make a .lib file for me?

Many thanks,

Kat


« Last Edit: May 07, 2009, 05:04:54 am by Kat B »

Offline Kat B

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Projects and a created DLL
« Reply #1 on: May 07, 2009, 05:49:49 am »
Some part of my questions was definately the workings of Code::Blocks because I think I am onto something.

When sneaking around the settings, I saw something called 'execution working dir'.

I Googled that and found this:
I found this:
http://forums.codeblocks.org/index.php?topic=10488.msg72024

So I created a new folder/directory called 'Output' and got the DLL to be created there, and then got the second project '.exe' file to be placed there, and then told Code::Blocks that the execution working dir for the exe was the new folder, and it worked.

It works, but is it right?


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Projects and a created DLL
« Reply #2 on: May 07, 2009, 06:39:22 am »
It works, but is it right?
It is one way of doing it and it's a good (right) way.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ