User forums > Help

[SOLVED] Codeblocks workspace build command line on Win7

(1/2) > >>

Suryavarman:
Hi,

I have a problem with my BuilWorkspace.bat. I want to close the window after the build but wxWidget crash. ( see the attachement file Capture_codeblock_build_error_01.JPG )


--- Code: ---::http://wiki.codeblocks.org/index.php?title=Code::Blocks_command_line_arguments
::http://www.codeblocks.org/docs/main_codeblocks_fr3.html#x3-380001.12
::http://forums.codeblocks.org/index.php?topic=1901.15;wap2
::http://oolua.googlecode.com/svn/trunk/build_scripts/codeblocks_tests.bat


@echo off

REM This batch requieres the following Windows free software:
REM * A Code::Blocks capable of building latest SVN HEAD

setlocal
set CB_PATH=C:\CodeBlocks
set CURRENT_PATH=%CD%
set PROJECT_PATH=X:\Solution\Workspaces\CodeBlocks

echo Compiling Code::Blocks itself...

CALL "%CB_PATH%\codeblocks.exe" --build "%PROJECT_PATH%/MyCB.workspace" --target="All" > "%CURRENT_PATH%\MyCB_Build.log"

echo FIXME codeblocks errorlevel: %errorlevel%

echo The build has completed.
goto END
:FAILED
echo The build has failed.

:END

--- End code ---

[attachment deleted by admin]

Suryavarman:
Another way :
http://forums.codeblocks.org/index.php?topic=9731.msg69835#msg69835
http://forums.codeblocks.org/index.php/topic,13675.0.html

Suryavarman:
cbp2make doesn't work with environnement variable ex : $(LIB)\Include  become \Include


--- Code: ---CALL "%CBP2MAKE_PATH%\cbp2make.exe" -in "%PROJECT_PATH%/CodeBlocks/MyWorkspace.workspace" -windows -cfg "%CURRENT_PATH%\cbp2make.cfg"
Pushd "%PROJECT_PATH%/CodeBlocks/"
CALL "%MINGW_PATH%\bin\mingw32-make.exe" -f "%PROJECT_PATH%/CodeBlocks/MyWorkspace.workspace.mak"
popd

--- End code ---

In cbp2make.cfg i have replace "make" by "C:\MinGW32\bin\mingw32-make.exe"

--- Code: ---        <platform name="Windows" path_delimiter="\">
            <command make_file="C:\MinGW32\bin\mingw32-make.exe $opts -f $file" />
            <command make_tool="C:\MinGW32\bin\mingw32-make.exe" />

--- End code ---

Suryavarman:
Only for the include it's work if i add -e or --environment-overrides ( Environment variables override makefiles.)


--- Code: ---Pushd "%PROJECT_PATH%/CodeBlocks/"
CALL "%MINGW_PATH%\bin\mingw32-make.exe" -f "%PROJECT_PATH%/CodeBlocks/MyCB.workspace.mak" -e -k
popd

--- End code ---

It cannot build because cbp2make generate for each project LIB_RELEASE = $(LIB)-lLibrary0_d -lLibrary1_d -lLibrary2_d

and mingw32-make.exe generate this error : g++.exe: error: X:\MyLibPath\-lLibrary0_d: No such file or directory

remark : $(LIB) == X:\MyLibPath

Suryavarman:

CALL "%CB_PATH%\codeblocks.exe" --build "%PROJECT_PATH%/MyCB.workspace" --target="All" > "%CURRENT_PATH%\MyCB_Build.log"

it's works if any targets aren't up to date.

now i use always --rebuild



Navigation

[0] Message Index

[#] Next page

Go to full version