Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Import library filename not work / not saved !
MortenMacFly:
--- Quote from: Feneck91 on May 17, 2011, 10:23:32 pm ---
--- Code: ---[[IO.CopyFile(_("$(#wx)/lib/gcc_dll/wxmsw$(#wxver)ud_gcc.dll"), _("../bin/$(output)/wxmsw$(#wxver)ud_gcc.dll"),false);]]
--- End code ---
But it always as me if it is confidence or not... Not really cool to use. Another way ?
--- End quote ---
Sure. You can use plain (Win32-)SHELL commands, like xcopy or just copy. With macros I meant making use of e.g. $(TARGET_OUTPUT_FILE) or alike...
For example: I've a project that compiles the DLL's and link libs in a .lib folder. Then I setup a batch "make copy.bat" file like this:
--- Code: ---@echo off
if not exist "%1" goto PluginNotFound
if "%2"=="" goto MissingPluginName
if exist "..\%2.dll" (
rem copy the file only, if the ARCHIVE flag is set
rem (avoid copying if file is unchanged)
echo Updating %2...
rem D: Only newer files (by date)
rem M: Copy on / and reset archive attribute
rem Y: Answer queries about overwriting with "Yes"
xcopy "%1" .. /D /M /Y
)
if not exist "..\%2.dll" (
echo Copying %2...
copy "%1" ..
)
goto TheEnd
:PluginNotFound
echo Error: Plugin not found.
goto TheEnd
:MissingPluginName
echo Error: Name of the plugin not provided.
goto TheEnd
:TheEnd
--- End code ---
As a post-build step I can then use:
make_copy.bat $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_BASENAME)
...for all plugin DLL's I'd like to copy.
Notice that you would need to adjust the path ("..") in the batch file accordingly, so it matches your setup.
scarphin:
Here is what works for me. Say I have a 'fubar' project in
--- Code: ---projects\fubar\
--- End code ---
where the 'fubar.cbp' resides. Then I create a 'dynamic dll' target and set the output filename to
--- Code: ---bin\Debug\foo.dll
--- End code ---
and the import library filename to
--- Code: ---lib\$(TARGET_OUTPUT_BASENAME)dbg
--- End code ---
.The lib folder must be created before building the target.
After I build the target I have a 'foo.dll' in
--- Code: ---fubar\bin\debug\
--- End code ---
folder and a 'libfoodbg.a' in
--- Code: ---fubar\lib\
--- End code ---
folder as I want them and set them to be. But when I restart CB import library filename setting reverts back to
--- Code: ---$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME)
--- End code ---
and make me lose the setting. The linker can definitely create the target dll and the import library in different folders so I don't get what doesn't work here to make this setting not saved?
OS: Win 7
CB: svn 7173, May 28 Nightly
MinGW GCC: v4.5.2
Navigation
[0] Message Index
[*] Previous page
Go to full version