Author Topic: [SOLVED] Use CB with command line ... dont work for me ...  (Read 2872 times)

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 45
[SOLVED] Use CB with command line ... dont work for me ...
« on: August 02, 2023, 03:42:41 pm »
Hi,

I try to run CB in command line, under Windows 11, like this : "codeblocks.exe /na /nd --no-splash-screen --batch-build-notify --no-batch-window-close --rebuild Lesson06.workspace --target='All build'  "

In all my projects and workspaces, only one version of source files, but many target, it's the reason of use 'virtual target' -> All build.
 
Nothing to do, the message at the end of this batch build indicated all OK !!!   (codeblocks.exe in the PATH)
Then I return to IDE CB directly, all is good.

What's wrong ?

Thierry

PS : All my projects/workspaces CB are accessible here : https://github.com/tdechaize/Lesson01  ( ... Lesson02 etc.)

« Last Edit: August 04, 2023, 06:21:16 pm by ThierryD »

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1632
Re: Use CB with command line ... dont work for me ...
« Reply #1 on: August 02, 2023, 04:02:24 pm »
Have you tried specifying the target before the workspace name?
Have you tried a non-virtual target?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7666
    • My Best Post
Re: Use CB with command line ... dont work for me ...
« Reply #2 on: August 02, 2023, 05:56:23 pm »
Have you tried an target without a space in the name?
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 45
Response : Use CB with command line ... dont work for me ...
« Reply #3 on: August 04, 2023, 06:18:56 pm »
Hi,

Before, here the "Information" about my installed confif of CB :

Name                    : Code::Blocks
Version                 : svn-r13320
SDK Version             : 2.24.0
Scintilla Version       : 3.7.5
Author                  : The Code::Blocks Team
E-mail                  : info@codeblocks.org
Website                 : https://www.codeblocks.org
OS                      : Windows 11 (build 22621), 64-bit edition
Scaling factor          : 1.000000
Detected scaling factor : 1.000000
Display PPI             : 96x96
Display count           : 1
Display 0 (\\.\DISPLAY1): XY=[0,0]; Size=[1920,1080]; Primary

wxWidgets Library (wxMSW port)
Version 3.2.2 (Unicode: wchar_t, debug level: 1),
compiled at Jun  4 2023 17:29:33

Runtime version of toolkit used is 10.0.

To Miguel  and stahta01

I try command line with workspace at the end : codeblocks.exe /na /nd --no-splash-screen --batch-build-notify --no-batch-window-close --rebuild --target='All build' Lesson06.workspace
The log of CB is : Nothing to be done (all items are up-to-date).

All of my target (virtual or real (s)) contained a space in your "name".
Example : "Debug Mingw32 official" or "Release Mingw32 official" or "Debug lcc" or "Release lcc" ... etc.
I try this : codeblocks.exe /na /nd --no-splash-screen --batch-build-notify --no-batch-window-close --rebuild --target='Debug lcc' Lesson06.workspace
The log of CB is same : Nothing to be done (all items are up-to-date).

Then, I try with "double quote" to design target : codeblocks.exe /na /nd --no-splash-screen --batch-build-notify --no-batch-window-close --rebuild --target="Debug lcc" Lesson06.workspace
Good try, the log of CB is :

-------------- Clean: Debug lcc in Lesson06 (compiler: LCC Compiler)---------------

Cleaned "Lesson06 - Debug lcc"

-------------- Build: Debug lcc in Lesson06 (compiler: LCC Compiler)---------------

Running target pre-build steps
lrc.exe -IC:\lcc\include -foobjlcc32\Debug\src\Lesson06.res  src\Lesson06.rc
lcc.exe -c -IC:\lcc\include  -g2 -D_DEBUG -DDEBUG    src\Lesson06.c -Foobjlcc32\Debug\src\Lesson06.obj
lcclnk.exe -LC:\lcc\lib  objlcc32\Debug\src\Lesson06.obj  objlcc32\Debug\src\Lesson06.res glu32.lib opengl32.lib advapi32.lib comdlg32.lib gdi32.lib winmm.lib -o binlcc32\Debug\Lesson06.exe
Warning src\lesson06.c: 253  Missing prototype for 'LoadGLTextures'
0 errors, 1 warning
Output file is binlcc32\Debug\Lesson06.exe with size 55.33 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 1 warning(s) (0 minute(s), 0 second(s))
Build log saved as:
file://C:/src/OpenGL/NeHe_Lesson06-master/Lesson06_build_log.html
 
I retry, with virtual target : codeblocks.exe /na /nd --no-splash-screen --batch-build-notify --no-batch-window-close --rebuild --target="All build" Lesson06.workspace
All good  8).

Many thank's, now I can regenerate all of my "many" projects CB after change of version of compilers (CLANG, MSYS2, ...) or after change "Nigthly build" of CB by example ..

Thierry.

PS : in attachment, the new log of rebuild (totally rebuild), today ... in batch mode.