User forums > Using Code::Blocks
Copying DLL's to Release folder?
Lowkus:
I'm new to C++ and CodeBlocks... is there an easy way to automatically copy all the dependent DLL's into the exe release folder? Currently I'm hunting down and copying them manually. I'm compiling on Win7 x64, if that matters.
oBFusCATed:
You can write a post build step script to do it.
Lowkus:
Is it a simple script that automatically copies all dependent DLL's to the target destination? Or do I have to manually find all the DLL's and write them line-by-line into the script, updating the script manually whenever the dependencies change over the course of development?
I was hoping to avoid manually writing a script. So far what I've scripted (below) throws an "execution fails" error.
IO.CopyFile(_"$(#wx.lib)\gcc_dll\wxmsw310u_gcc_cb.dll", _"$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)wxmsw310u_gcc_cb.dll", true)
Execution of 'IO.CopyFile(_"C:\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll", _"C:\cProjects\AppTest\bin\Release\wxmsw310u_gcc_cb.dll", true)' in 'C:\cProjects\AppTest' failed.
oBFusCATed:
There is nothing automatic. You have to find the list and write copy commands for everything you need.
Are you sure that _"blbabla" is valid syntax? I think it should be _("blabla").
dmoore:
You could munge the output of a dependency checker, but you only want stuff that isn't already present on a clean system
http://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency
Navigation
[0] Message Index
[#] Next page
Go to full version