Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Kat B on May 07, 2009, 05:01:34 am

Title: Projects and a created DLL
Post by: Kat B 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


Title: Re: Projects and a created DLL
Post by: Kat B 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?

Title: Re: Projects and a created DLL
Post by: MortenMacFly 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.