Missing -fPic option in codeblocks project

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.

Missing -fPic option in codeblocks project

Postby teto » Sat Jun 16, 2012 12:12 pm

Hi,

I think there is a missing "-fPic" option in the codeblocks project for linux fast math build. After adding it, the build works.

I take advantage of this post to ask for a little improvement - from my point of view - but maybe I am the only one working this way: I like to keep "debug" and "release" builds separated (because of compilation speed, it allows to have a WIP version and a working one etc...), for Irrlicht and for the final game as well .
With the current targets, when you build the debug version, it erases the release one (both are called libIrrlicht.so/dll). I wonder if it would be possible to have the debug target called differently, for example libIrrlichtDebug.so ?


I've seen other projects (SFML for example but I doubt it is the only one) doing this.

Well that's not a big deal if not possible, I will keep modifying the project ^^

Matt
Using trunk with mingw/gcc 4.6, Windows 7 64 bits driver opengl
User avatar
teto
 
Posts: 159
Joined: Thu Dec 03, 2009 9:37 pm
Location: /home

Re: Missing -fPic option in codeblocks project

Postby Bl00drav3n » Sat Jun 16, 2012 1:56 pm

Would be nice if the build targets would be seperated. I modified the cbp too so that it outputs Irrlicht.a and Irrlichtd.a seperatly.
Bl00drav3n
 
Posts: 48
Joined: Sun Apr 22, 2012 11:55 pm
Location: Vienna

Re: Missing -fPic option in codeblocks project

Postby hendu » Sat Jun 16, 2012 6:26 pm

Why bother? For me the debug build is simply the release build with -g. Shipping is just a strip away.
hendu
 
Posts: 1552
Joined: Sat Dec 18, 2010 12:53 pm

Re: Missing -fPic option in codeblocks project

Postby CuteAlien » Tue Jun 26, 2012 8:18 pm

Thanks, I've changed it in svn trunk.

Build targets with different names have some advantages, some disadvantages. I guess some day we switch to cmake anyway (when it's C::B support starts being good enough) and maybe we can consider doing such changes then.
IRC: #irrlicht on irc.freenode.net
My patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Games with Irrlicht: http://www.irrgheist.com/
News: http://www.reddit.com/r/irrlicht/
User avatar
CuteAlien
Admin
 
Posts: 5349
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Missing -fPic option in codeblocks project

Postby hendu » Wed Jun 27, 2012 8:56 am

Please no, cmake is absolutely horrible for cross-compiling (mingw on linux, for example). It's not exactly nice for native builds either, with some customizations like install dirs or flags being very difficult to make it obey.
hendu
 
Posts: 1552
Joined: Sat Dec 18, 2010 12:53 pm

Re: Missing -fPic option in codeblocks project

Postby CuteAlien » Wed Jun 27, 2012 11:08 am

Maybe we should write our own scripts to modify project files, but I guess that's pretty much the idea behind CMake. The problem is that we have lots of projects files which are affected on each change and cmake would theoretically allow us to get rid of that. Also people using unsupported IDE's (Eclipse mostly) would it have easier then. But yeah - results of CMake are still far from optimal in some cases, which is why I also stopped using it again in own projects. Certainly we could just add cmake files additionally - but that would mean supporting even one more project file.

I guess there's no perfect solution for this yet.
IRC: #irrlicht on irc.freenode.net
My patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Games with Irrlicht: http://www.irrgheist.com/
News: http://www.reddit.com/r/irrlicht/
User avatar
CuteAlien
Admin
 
Posts: 5349
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Missing -fPic option in codeblocks project

Postby hendu » Wed Jun 27, 2012 12:04 pm

Solution is to not to use project files. Most IDEs can be made to call "make".
hendu
 
Posts: 1552
Joined: Sat Dec 18, 2010 12:53 pm

Re: Missing -fPic option in codeblocks project

Postby CuteAlien » Wed Jun 27, 2012 12:36 pm

That's not a solution - I can use CMake to generate makesfiles. But then you lose the features that make it worth using an IDE.
IRC: #irrlicht on irc.freenode.net
My patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Games with Irrlicht: http://www.irrgheist.com/
News: http://www.reddit.com/r/irrlicht/
User avatar
CuteAlien
Admin
 
Posts: 5349
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Missing -fPic option in codeblocks project

Postby hybrid » Wed Jun 27, 2012 1:02 pm

I think the idea was to set up a generic project file for each IDE, and configure the file in such a way that all Irrlicht specific things are defined and configured in the Makefile. Just use, e.g., the c::b targets to call different makefile targets. This would be, to some extent, a more generic solution that what we have now. But I also see the downsides such as requiring the end user to deal with Makefiles if certain special configs are required. And that's probably enough downside already to skip this way. CMake could reduce the overall number of project files, though, in case we can generate the more exotic project files to CMake versions and only maintain two or three important tools manually.
hybrid
Admin
 
Posts: 13943
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany


Return to Open Discussion and Dev Announcements

Who is online

Users browsing this forum: No registered users and 1 guest