Author Topic: codeblocks' project building on non-x machine  (Read 5170 times)

Offline cyplo

  • Single posting newcomer
  • *
  • Posts: 7
    • Cyryl Plotnicki-Chudyk
codeblocks' project building on non-x machine
« on: May 05, 2007, 11:06:00 pm »
Hi there !

I am totally satisfied with codeblocks as an IDE and want to make automatic test builds on the headless server with no X
Does codeblocks support pure command-line builds ?

I tried
Code
codeblocks --build workspace.workspace
but it tells me that
Code
Error: Unable to initialize gtk, is DISPLAY set properly?

Am I missing something ?

Cyryl Plotnicki-Chudyk

Offline jarro_2783

  • Multiple posting newcomer
  • *
  • Posts: 99
    • Project Freedom
Re: codeblocks' project building on non-x machine
« Reply #1 on: May 07, 2007, 02:12:24 am »
I'm guessing since that one is using wxGTK, it tries to initialise wx and hence GTK first. Since it can't it just dies. What you're suggesting would be kind of nice if it could be done though.

edit: I'm pretty sure wx is responsible for "main", whenever you write something that uses wx you only derive from wx base classes. This would seem to say that wx is always initialised first so you can't do what you're asking.
« Last Edit: May 07, 2007, 02:14:43 am by jarro_2783 »

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: codeblocks' project building on non-x machine
« Reply #2 on: May 07, 2007, 02:37:02 am »
That would be a nice feature to implement (jarro_2783 : it IS possible to not initialise wxWidgets first, but it might take work in C::B to use that)

Offline jarro_2783

  • Multiple posting newcomer
  • *
  • Posts: 99
    • Project Freedom
Re: codeblocks' project building on non-x machine
« Reply #3 on: May 07, 2007, 03:18:59 am »
yeah I figured surely it had to be possible, but I also figured it wouldn't be exactly straight forward either.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: codeblocks' project building on non-x machine
« Reply #4 on: May 07, 2007, 09:30:27 am »
No, it's not possible now. Some wx gui classes are referenced in our sdk so a XServer running is a requirement.
This will change in a future version (e.g. 2.0+) but as you understand it will take a while...
Be patient!
This bug will be fixed soon...

Offline cyplo

  • Single posting newcomer
  • *
  • Posts: 7
    • Cyryl Plotnicki-Chudyk
Re: codeblocks' project building on non-x machine
« Reply #5 on: May 07, 2007, 10:26:03 am »
sure, thanks for your replies :)
I'll be waiting ;)
Cyryl Plotnicki-Chudyk

Offline geiermeier

  • Multiple posting newcomer
  • *
  • Posts: 19
Re: codeblocks' project building on non-x machine
« Reply #6 on: June 19, 2009, 09:16:49 am »
What is the state on this topic. I think it's a very important feature to be able to build your project from the commandline (e.g. from a script). I've just stumbled accross git-bisect - it lets you automatically find a revision of your source code that broke a certain test. For this to work, headless builds are essential.