Code::Blocks Forums
User forums => Using Code::Blocks => Topic started 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
-
Is anything like that available?
Sorry, but no. BTW: this would be far more complex than makefiles.
With regards, Morten.
-
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 ...
-
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.
-
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
-
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).
-
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.
-
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.
-
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.
-
Hmm, this is too complicated for me :shock:
If the user does not have codeblocks installed he must use precompiled binaries :twisted:
-
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.
-
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.
-
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.
-
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.
-
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.
-
It does support Code::Blocks on the Mac. That is pretty powerful. :wink: