Author Topic: [SOLVED] Codeblocks workspace build command line on Win7  (Read 9948 times)

Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
[SOLVED] Codeblocks workspace build command line on Win7
« on: November 08, 2013, 08:03:15 pm »
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

[attachment deleted by admin]
« Last Edit: November 20, 2013, 08:55:14 pm by Gandi »


Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
Re: WxWidget crash when I call CB with .bat on Win7
« Reply #2 on: November 10, 2013, 08:55:00 pm »
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

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" />
« Last Edit: November 11, 2013, 11:46:58 am by Gandi »

Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
Re: WxWidget crash when I call CB with .bat on Win7
« Reply #3 on: November 12, 2013, 02:38:05 pm »
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

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

Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
Re: Codeblocks workspace build command line on Win7
« Reply #4 on: November 12, 2013, 02:59:51 pm »

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




Offline Suryavarman

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Suryavarman
Re: [Resolved]Codeblocks workspace build command line on Win7
« Reply #5 on: November 12, 2013, 11:21:07 pm »
I add this ticket :
[ Bug #19192 ] codeblocks.exe --build crash if all targets are up to date