Greeting, I'm a new user of CodeBlocks and I'm developing a software that needs to call the CodeBlocks compiler using the command prompt. I checked the manual of CodeBlocks and I used this command:
C:\CodeBlocks>codeblocks.exe /na /nd --no-splash-screen --no-batch-window-close --rebuild C:\Users\Pedro\Desktop\teste\teste\teste.cbp --target='Debug'
When I run this I always get the message "Nothing to be done" and the project is not rebuild. The same happens if i use --build instead of --rebuild.
However, if i try to build using CodeBlocks (not in command prompt but in the application), the build works with no problems...
Probably is something simple that I'm missing here, but I would appreciate any help. Thanks.
Code::Blocks version/SVN?
Also, I think the OS Name and version will be needed.
Note: I have no idea how to help; but, the above info is needed in nearly all cases.
Edit: Might try double quote
--target="Debug"
Edit: the cbp needs to be the last thing in the line per this wiki:
http://wiki.codeblocks.org/index.php?title=Code::Blocks_command_line_arguments (http://wiki.codeblocks.org/index.php?title=Code::Blocks_command_line_arguments)
Tim S.
Please copy and paste the exact command you use (the commandline in your first post seems to contain at least one typo).
The command that I used is exactly the one that is on my first post.
The CodeBlock version is 10.05 and the OS is Windows 7.
Again:
Quote from: jens on July 13, 2011, 04:12:51 PM
Please copy and paste the exact command you use (the commandline in your first post seems to contain at least one typo).
This can not work:
Quote from: sion005 on July 13, 2011, 03:46:28 PM
C:\CodeBlocks>codeblocks.exe /na /nd --no-splash-screen --no-batch-window-close --rebuild C:\Users\Pedro\Desktop\teste\teste\teste.cbp --target='Debug'
and so it can not be the exact commandline !
I finally got it! Like Tim S. said, I replaced the quote by double quote and worked fine. Problem solved!
So, the command to use to build/rebuild in the command prompt is:
codeblocks.exe /na /nd --no-splash-screen --no-batch-window-close --rebuild C:\GameDev\GettingsStarted\teste\teste.cbp --target="Debug"
By the way jens, C:\CodeBlocks> is the path where I have my CodeBlocks installation, is not part of the command. :)
Anyway, thanks for your help guys!
Hello.
Trying to build from command line, it works OK, but there's no console output from codeblocks, but the wiki states that it should output something.
How can i get the build log ?
Do not resurrect old threads, create a new one...
The build log is in the build log tab at the bottom of codeblocks.
If it is not visible:
View->Logs->Build log
Thanks for a reply, but i'm talking about command line build, so this topic suits perfectly.
I cannot get any console output of out of codeblocks, but wiki states that ona can redirect the output even to a file
Have you tried to pass the --log-to-file command option?