Author Topic: Copying a DLL into another project's directory  (Read 3914 times)

aviary

  • Guest
Copying a DLL into another project's directory
« on: January 14, 2006, 06:19:07 pm »
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.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Copying a DLL into another project's directory
« Reply #1 on: January 14, 2006, 06:22:31 pm »
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

  • Guest
Re: Copying a DLL into another project's directory
« Reply #2 on: January 14, 2006, 06:27: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?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Copying a DLL into another project's directory
« Reply #3 on: January 15, 2006, 01:21:17 am »
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."