Linux IDE's suck!!

Discussion about everything. New games, 3d math, development tips...
anylo
Posts: 71
Joined: Mon Feb 20, 2006 11:14 am

Post by anylo »

Just upgraded into Ubuntu Feisty (had no problems), switched from fglrx driver to ati+aixgl and compiled svn version of Irrlicht. Everything runs quite fine (except in example 16 there's some flickering in those textures).
anylo
Posts: 71
Joined: Mon Feb 20, 2006 11:14 am

Post by anylo »

hybrid wrote:And valgrind is *THE* tool for mem leak checking. I just recently switched to the latest version and it's mind-blowing.
Thanks mate, that looks quite promising.
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

For C++ development VisualStudio has no equal, on Linux or any other non-Windows platform. If you are going from Windows to Linux and expect VisualStudio, you are always going to be let down. I've tried all of the C++ IDEs I could find for Linux. Code::Blocks is the best one. The debugger actually works. On Linux I like to use the more traditional vi + make but I still will install Code::Blocks just for the debugger.

Make is a very powerful tool for project management, by far more powerful than any IDE. The problem is most people don't care. They don't want that power. They just want to be able to drag and drop some C++ files into a project folder and hit F5 ;).
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
kornerr
Posts: 245
Joined: Thu Jul 06, 2006 9:57 am
Location: Russia, Siberia, Kemerovo
Contact:

Post by kornerr »

VIM + Makefiles are better than IDEs, believe me :)
Clicking here and there takes too much time. While when you type you know what to type. It's faster, better, and easier.
Open Source all the way, baby ;)
OSRPG
Katsankat
Posts: 178
Joined: Sun Mar 12, 2006 4:15 am
Contact:

Post by Katsankat »

This is highly interesting.
Sorry for this long post, but it could save a lot more.
Ok, I am also a linux fan since 1998. Coincidence? This is when I realized I would have to throw 150 bucks every 3 years just because someone is forcing to do so, anyway...
I much prefer a gui that makes it easier to set compile options, include directories, link libs, etc. than either try (and fail) to remember what all those params mean, or dig around in man files to figure them out. basically the gui saves me time, and I like that.
Good point. pkg-config is what we need. For compilation from command line, or from makefile.

To see apps using pkg-config, check this command

Code: Select all

$ pkg-config --list-all
It will output a list of apps using pkg-config. Take one, for example gtk+-2.0.
Now, I want all includes to compile a GTK+ app. Simple:

Code: Select all

$ pkg-config --cflags gtk+-2.0
-DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
Isn't this great? Now I want the libs. All. Now.

Code: Select all

$ pkg-config --libs gtk+-2.0
-Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
Wow! all options!
Thus the command line to compile a GTK+ application is simply:

Code: Select all

gcc -Wall `pkg-config --cflags --libs gtk+-2.0` main.c -o myapp
The `pkg-config --cflags --libs gtk+-2.0` instruction will be executed, and the result injected into command. This is dynamic finding of complex infos no-one want to remember. A must.

To make is even more convenient, I am personnaly using a (simple) alias in my .bashrc:
alias cgtk='gcc -Wall `pkg-config --cflags --libs gtk+-2.0` -fomit-frame-pointer -s -O2 -o '
This way, when i want to compile a GTK+ app, all i have to do is:

Code: Select all

$ cgtk myapp main.c
This is why I am coming to the conclusion that we must integrate Irrlicht into pkg-config.

Code: Select all

$ g++ `pkg-config --cflags --libs irrlicht-1.2` -o example main.cpp
Furthermore, the Hello world makefile you posted above would become

Code: Select all

CPP = g++
INCS =  `pkg-config --cflags Irrlicht-1.2`
LIBS =  `pkg-config --libs Irrlicht-1.2`

all:
   $(CPP) $(LIBS) main.o object.o -o example
   $(CPP) -c $(INCS) object.cpp

clean:
   rm example 
Or something like that.

The classic makefile you posted above can still be used. pkg-config is just an add-on, a convenient tool, widely used.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I know one IDE for Linux - Borland Kylix, but seems it's dead now. This IDE implements their VCL like CLX library for Linux. C++ and Pascal are used like main languages. Two versions - Standard version was free!
By unknown reasons for me Borland was stopped Kylix support and IDE works only with old kernels. Even on their site download link was removed. Sad but true.
Long ago their C++Builder support CLX, so it's possible to create Linux application by Windows IDE, but by me it's uncomfortable and never tried.
ImageImage
Site development -Rock and metal online
--- etcaptor.com ------freenetlife.com
RapchikProgrammer
Posts: 279
Joined: Fri Dec 24, 2004 6:37 pm

Post by RapchikProgrammer »

I totally agree wid buhatkj, Ubuntu is gr8 but why doesnt linux have those simple installers?? I mean that wud help a lot! BTW I am having problem re-installing my ubuntu, can anyone here help? When i install it goes smoothly but at the copying step the installer hangs up and my cdrom doesnt open its tray or anything and an error comes that there is no cd in the drive even though it is there! It then shows me a list of all the processes that ubuntu installer will do and i can skip this step and go to the next step but that wud be useless ofcourse! Plz help me out here!
kornerr
Posts: 245
Joined: Thu Jul 06, 2006 9:57 am
Location: Russia, Siberia, Kemerovo
Contact:

Post by kornerr »

Code: Select all

./configure
make
make install
What can be simpler?
Open Source all the way, baby ;)
OSRPG
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

kornerr wrote:

Code: Select all

./configure
make
make install
What can be simpler?
apt-get install :)
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

kornerr wrote:

Code: Select all

./configure
make
make install
What can be simpler?
Actually it would be simpler if there were a common way to install software which would also work with binaries. The code above will work for some, apt-get update will work for others, rpm -i might work sometimes if you manage to handle the package dependencies. Don't get me wrong, apt-get is fantastic and beats windows installers hands down when it works. But not all packages are available for it.

And while this complicates things for users somewhat, it's pure hell for developers. Finding a way to get binary software running on all linux distributions seems close to impossible. Trying to add comfort functions like Startmenu entries, Quickstart buttons, Desktop icons to your software will drive you crazy. And even if you manage to get it all working, you can be nearly sure that it won't work anymore one year later .See the fate of the above mentioned Kylix - i actually managed to get it running once (no longer worth it - it's outdated), but i needed several hours(!) for it.

I see it like that: As long as the software you want to install is available for your package manager and as long as it's dependencies in that are not broken installing software on linux is a users dream. But as soon as this is not the case (and this happens rather often) it can start to get very very ugly. To get back to the ./configure make make install - this is a perfect example of stuff that can go wrong. You get to install it that way - but your package manager does not know about it. So a few months later it will update a library which is not used by any application known to the package manager. And your manually installed Application will suddenly stop working and you don't know why (as programmer you might know why - but most users won't have an idea).
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Hm, one more thing - getting back to IDE's and codeblock.
That's an example where i would recommend _not_ using
./configure
make
make install

This might work for a current version in the svn trunk or it might fail. But in any way the chance is high you want to update it some day to a newer version and if you are always using the way above it will once again work or fail. But if it fails it might overwrite your old working version with a not-working version without even asking you. So what i do when i try out new versions for codeblocks is installing them in a new folder each time in /opt (package managers don't care about /opt - you can do there whatever you want).
Like:

Code: Select all

./configure --prefix=/opt/codeblocks_svn_currentdate
make
su
make install
'currentdate' is certainly a date and not the word. Now i can try the new version without overwriting old versions. Oh and codeblocks might need sometimes an additional call to './bootstrap' before the ./configure. Just call it if ./configure fails.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

kornerr wrote:

Code: Select all

./configure
make
make install
What can be simpler?
Double-Click Setup.exe???
Last edited by Spintz on Sun Mar 04, 2007 2:34 pm, edited 1 time in total.
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

In all cases one should not compare the default situation, but those where you enable or disable features via configure. This is usually not possible vai apt-get and requires lots of clicking (if possible) with setup.exe. In turn configure has a set of standard options and often lots of other useful options.
kburkhart84
Posts: 277
Joined: Thu Dec 15, 2005 6:11 pm

Post by kburkhart84 »

Spintz wrote:
kornerr wrote:

Code: Select all

./configure
make
make install
What can be simpler?
Double-Click Setup.exe???
That's a good one. Seriously though, I'd rather have a GUI than to type how I want files to compile into code. Some Visual Studio stuff I don't use at all, but it is there if I need it. I think if I wanted to switch to linux, I'd be screwed for a while. I've heard linux is hard to install onto a box as well, but I've never done it so I don't know. How easy would it be for me to get a linux OS onto my laptop. It has Intel Core2Duo 1.6, video card is NVidia 7600 GO, for laptops. Right now, it has Windows Vista Home Premium, and 2 Gigs of RAM. I wouldn't mind getting Linux so I could make multi-platform games, since Irrlicht supports it anyway right. It seems I could even use Visual Studio to right the code and then open it in Linux for a compile. How easy is this do you guys who know Linux think??
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you take one of the major distributions it shoudl be fairly easy to install Linux in parallel to the current Windows. All tools for starting with Irrlicht should be available on the DVD or can be installed from the net.
Writing portable code with MSVC is possible, but you should avoid any assistance from the IDE. Stick to plain C++ and Irrlicht types, do not call any OS dependant methods (instead use the Irrlicht provided ones). Porting overhead should be small in those cases, but don't expect it to run immediately.
BTW: The new Irrlicht Makefiles are now working for gcc/mingw on Linux and Windows. And due to the fact that there's a cross compiler available on Linux I can now produce Linux and Windows binaries on my Linux machine. And using wine I can even test them under Linux :D
Post Reply