Author Topic: Exporters  (Read 5556 times)

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Exporters
« 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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9612
Re: Exporters
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5272
Re: Exporters
« Reply #2 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 ...

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Exporters
« Reply #3 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.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Exporters
« Reply #4 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

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Exporters
« Reply #5 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).

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Exporters
« Reply #6 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.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Exporters
« Reply #7 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.
« Last Edit: July 27, 2007, 10:36:21 am by Biplab »
Be a part of the solution, not a part of the problem.

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Exporters
« Reply #8 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.

Offline rotalever

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Exporters
« Reply #9 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:

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Exporters
« Reply #10 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.
« Last Edit: July 27, 2007, 10:13:51 pm by Game_Ender »

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Exporters
« Reply #11 on: July 27, 2007, 11:47:48 pm »
Premake 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.
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Exporters
« Reply #12 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.

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Exporters
« Reply #13 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

some examples in the documentation:
Variables defined for Mac OSX

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.
« Last Edit: July 29, 2007, 02:00:51 am by RJP Computing »
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Exporters
« Reply #14 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.