Author Topic: How compile in command line  (Read 10286 times)

Offline wever

  • Multiple posting newcomer
  • *
  • Posts: 49
How compile in command line
« on: January 26, 2015, 08:34:34 pm »
Does CB have command line to compile project? I have downloaded ijp (jpeg library) and in install.txt there is written I have to compile it in command line. I cannot find any makefile for cb however, there are these files:

how could I compile the project?
« Last Edit: January 26, 2015, 11:25:10 pm by wever »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How compile in command line
« Reply #1 on: January 26, 2015, 09:05:42 pm »
Try codeblocks --help to see all the command line option.
But this won't help you as cb doesn't support compiling makefile projects with a cbp project file.
The best thing you can do is consult the documentation of the library you're trying to build for the exact method you need to use on your operating system.

BTW: Keep in mind that codeblocks is not a compiler/linker, but an IDE!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: How compile in command line
« Reply #2 on: January 27, 2015, 10:05:28 pm »
Probably a bit misleading: cb supports custom makefile projects but not compiling makefile projects without a project file via the command line.
However, if not using the native cb build system you are missing a lot features and slow down the build process.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: How compile in command line
« Reply #3 on: January 27, 2015, 11:03:42 pm »
just to make this clear: c::b IS NOT A COMPILER but a IDE. This are two different things (if you don't know search on wikipedia)....
If you wan't compile  ijp like it is specified in install.txt you have to use the mingw32-make.exe (if you are on windows) or just make in linux. And if so, then this is the wrong forum to ask this kind of questions.

lazac

  • Guest
Re: How compile in command line
« Reply #4 on: March 06, 2023, 01:37:28 pm »
Some IDE can compile their projects from command line, e.g. Lazarus with the lazbuild utility, or Visual Studio with msbuild command. In same development scenarios, it can be a very handy feature: e.g. compiling projects on a remote computer and/or on slow embedded systems.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7670
    • My Best Post
Re: How compile in command line
« Reply #5 on: March 07, 2023, 03:17:35 pm »
Some IDE can compile their projects from command line, e.g. Lazarus with the lazbuild utility, or Visual Studio with msbuild command. In same development scenarios, it can be a very handy feature: e.g. compiling projects on a remote computer and/or on slow embedded systems.

CB can compile from the command line; but, it still uses the GUI program to do it; and I think it requires an CB project file.

Edit: Add link https://wiki.codeblocks.org/index.php/Code::Blocks_command_line_arguments

Tim S.
« Last Edit: March 08, 2023, 03:12:30 am by stahta01 »
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