Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: rotalever on July 26, 2007, 03:01:04 pm

Title: Exporters
Post by: rotalever on July 26, 2007, 03:01:04 pm
Hi,
I am new to CB. First I must say this software IS amazing.
But is it possible to export a CB-Project as a GNU autoconf/automake project and as a MS Visual C++ Project? I've read in the forums that a GNU makefile exporter exists but I need something that creates those "configure && make" scripts...
Is anything like that available?

Thanks in advance.

regards,
rotalever
Title: Re: Exporters
Post by: MortenMacFly on July 26, 2007, 04:16:26 pm
Is anything like that available?
Sorry, but no. BTW: this would be far more complex than makefiles.
With regards, Morten.
Title: Re: Exporters
Post by: killerbot on July 26, 2007, 04:22:31 pm
in case you need the makefiles for automatic building, well CB can be called on the command prompt --> no GUI and it just builds the project/workspace/target you specify ...
Title: Re: Exporters
Post by: rotalever on July 26, 2007, 08:34:28 pm
The configure & makefiles are not for automatic building, but for the user. It is a common way to call "configure" and "make" and "make install" in linux to install a software package from source.
Title: Re: Exporters
Post by: JGM on July 27, 2007, 03:33:38 am
The configure & makefiles are not for automatic building, but for the user. It is a common way to call "configure" and "make" and "make install" in linux to install a software package from source.

Maybe this can be of help
http://forums.codeblocks.org/index.php/topic,6241.0.html
Title: Re: Exporters
Post by: Game_Ender on July 27, 2007, 05:22:46 am
A better solution would be to use CMake for your build system.  The CVS version (might of been released by now) now supports generating Code::Blocks project files on Windows and Linux.  It also generates tons of other formats like Xcode on Mac, and VS project files on Windows.  Code::Blocks project files are no more portable than Makefiles so it would be quite hard to generate something as portable as an autotools project (ie, there is not enough information in the a CB project file).
Title: Re: Exporters
Post by: rotalever on July 27, 2007, 10:18:54 am
But then I have to manage my project with CMake instead of codeblocks?
Why do you say CB-files are not as portable? A configure and makefile is nothing big.
Title: Re: Exporters
Post by: Biplab on July 27, 2007, 10:31:34 am
But is it possible to export a CB-Project as a GNU autoconf/automake project ..

Morten already wrote that. It's *not* possible to export C::B project as a autoconf/automake project.

You've to write autoconf macros on your own or use any makefile generating utility (CMake or Bakefile).

But then I have to manage my project with CMake instead of codeblocks?

You'd generate the autoconf macros and C::B project files using CMake. So you can manage ur app in C::B and use configure and make as well.
Title: Re: Exporters
Post by: Game_Ender on July 27, 2007, 02:39:50 pm
Well you would compile your application with CB and have no need for configure or make because CMake replaces autotools and Code::Blocks replaces make.  If you wish you could tell CMake to generate Makefiles instead of Code::Blocks project files.  Using CMake gives you the flexibility to use Code::Blocks when you want to, and still have a completely command line only build (ie no X server required).

Code::Blocks project files are not as portable as autoconf or CMake projects because for the most part you have to hard code library names, library search paths, and header search paths.  Also Code::Blocks lacks any kind of autoconf functionality.
Title: Re: Exporters
Post by: rotalever on July 27, 2007, 08:55:12 pm
Hmm, this is too complicated for me  :shock:
If the user does not have codeblocks installed he must use precompiled binaries  :twisted:
Title: Re: Exporters
Post by: Game_Ender on July 27, 2007, 10:12:13 pm
Yeah well C++ and portable build systems aren't really simple or easy.  That's the reason there are many new projects, commercial and open source, which are trying to make it easier.  Sometimes just editing a text file is easier than clicking through a bunch of menus.  You might want to give things like CMake, Scons, or Premake another try.
Title: Re: Exporters
Post by: RJP Computing on July 27, 2007, 11:47:48 pm
Premake (http://premake.sf.net) is a good replacement for the "configure" step in "configure & make". I really think it is the simplest and most elegant solution, but I realize that it is kind of a personal taste. I use it for many projects, big and small. It works great in Linux and Windows.
Title: Re: Exporters
Post by: Game_Ender on July 28, 2007, 12:48:04 am
Premake does look very good but it lacks Mac support, so while attempting to combine the best of Both CMake (ability to generate native build files) and Scons (uses a "real" language) it falls short of being a complete solution because of the lack of that support.
Title: Re: Exporters
Post by: RJP Computing on July 28, 2007, 08:29:39 pm
Premake does look very good but it lacks Mac support,
...
You are incorrect. It supports Mac OSX and it has for as long as I have used it. (At least a year)

Mac OSX download (http://premake.sourceforge.net/download)

some examples in the documentation:
Variables defined for Mac OSX (http://premake.sourceforge.net/functions)

It will support Code::Blocks projects and Make files for sure. I know this because a project I work on uses Premake and it has been reported that it works fine in Mac OSX.

FYI.
Title: Re: Exporters
Post by: Game_Ender on August 01, 2007, 10:58:23 pm
It doesn't create Xcode project files, so it basically doesn't support mac any better than Scons does.  The point I am trying to make is, there is no native build file generator that use a nice powerful language.  Premake and CMake are very close, I just hope they get there.
Title: Re: Exporters
Post by: RJP Computing on August 02, 2007, 05:25:07 am
It does support Code::Blocks on the Mac. That is pretty powerful.  :wink: