News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Copying a DLL into another project's directory

Started by aviary, January 14, 2006, 06:19:07 PM

Previous topic - Next topic

aviary

I'm using CodeBlocks on Windows, and I'd like to know how to have a DLL project copy the output DLL to another dependent project's directory.  Can I configure this from the project that needs the DLL, or should I configure this from the DLL project?

If there's an option to make a common directory of all the DLLs I'm making myself (like a dllcommon or something), I'm okay with that too.

killerbot

configure your projct creatinthe dll, target settings, you can specify the output path for that project.
1) right click on your project in the project tree and choose properties
2) targets tab
3) adjust output filename to your wishes (including specifying in which directory you want it)

Lieven

aviary

Quote from: killerbot on January 14, 2006, 06:22:31 PM
1) right click on your project in the project tree and choose properties
2) targets tab
3) adjust output filename to your wishes (including specifying in which directory you want it)

Thanks.  This, however, only creates one instance of the DLL... if I want to reuse the project for a second DLL dependend project, that'll be hell. =)  Is this the only way?

thomas

You could either run post-build steps in the DLL's project, or pre-build steps in the dependent project.

Anything that goes into a normal shell command (so, for example copy or cp) can be put in there, and you can use variables, so you don't have to hardcode the pathname.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."