User forums > Using Code::Blocks
Copying DLL's to Release folder?
Lowkus:
I added the parenthesis but still no luck.
IO.CopyFile(_("$(#wx.lib)\gcc_dll\wxmsw310u_gcc_cb.dll"), _("$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)wxmsw310u_gcc_cb.dll"), true)
BlueHazzard:
any error message?
Lowkus:
Same error message as before, with slight variation.
Execution of 'IO.CopyFile(_("C:\wxWidgets-3.1.0\lib\gcc_dll\wxmsw310u_gcc_cb.dll"), _("C:\Users\Mark\Documents\cProjects\AppTest\bin\Debug\wxmsw310u_gcc_cb.dll"), true)' in 'C:\Users\Mark\Documents\cProjects\AppTest' failed.
BlueHazzard:
1) You need to escape (replace) the '\' character with "\\"
2) You have to use the function "ReplaceMacros()" for expanding $(TARGET_OUTPUT_DIR) ecc.
not tested:
--- Code: ---IO.CopyFile(ReplaceMacros(_("$(#wx.lib)\\gcc_dll\\wxmsw310u_gcc_cb.dll")),ReplaceMacros( _("$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)wxmsw310u_gcc_cb.dll")), true)
--- End code ---
greetings
Aaron:
So is the example script given in the 'The Build Process Of Code::Blocks' page here: http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks be valid syntax ?
It produces the below attached error. (When tested with the 'Vallidate all attached scripts' button, and during build)
Script example given:
--- Code: ---cmd /c copy "$(PROJECT_DIR)$(TARGET_OUTPUT_FILE)" "C:\Program\bin"
--- End code ---
I added the 'expected end of statement ";", but the error was the same.
I am working toward a script to copy the wxmsw30u_gcc_custom.dll to my current project's Release folder.
Like this:
--- Code: ---cmd /c copy "$(#wx.lib)\\gcc_dll\\wxmsw30u_gcc_custom.dll" "$(PROJECT_DIR)"
--- End code ---
or this:
--- Code: ---cmd /c copy "$(#wx.lib)\gcc_dll\wxmsw30u_gcc_custom.dll" "$(PROJECT_DIR)";
--- End code ---
Both of my scripts produce same error.
I'm not finding separate places for Pre-Build or Post-Build scripts, that I have read references to.
I'm placing it in: Project properties, Build scripts tab, Release, Attached build scripts (file loc path).
Advice appreciated.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version