Code::Blocks Forums

User forums => Help => Topic started by: cyplo on May 05, 2007, 11:06:00 pm

Title: codeblocks' project building on non-x machine
Post by: cyplo 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 ?

Title: Re: codeblocks' project building on non-x machine
Post by: jarro_2783 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.
Title: Re: codeblocks' project building on non-x machine
Post by: Auria 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)
Title: Re: codeblocks' project building on non-x machine
Post by: jarro_2783 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.
Title: Re: codeblocks' project building on non-x machine
Post by: mandrav 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...
Title: Re: codeblocks' project building on non-x machine
Post by: cyplo on May 07, 2007, 10:26:03 am
sure, thanks for your replies :)
I'll be waiting ;)
Title: Re: codeblocks' project building on non-x machine
Post by: geiermeier 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.