Linux IDE's suck!!
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 .
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/
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
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.
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
OSRPG
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...
To see apps using pkg-config, check this commandIt 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:Isn't this great? Now I want the libs. All. Now.
Wow! all options!
Thus the command line to compile a GTK+ application is simply: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:This is why I am coming to the conclusion that we must integrate Irrlicht into pkg-config.
Furthermore, the Hello world makefile you posted above would become
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.
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...
Good point. pkg-config is what we need. For compilation from command line, or from makefile.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.
To see apps using pkg-config, check this command
Code: Select all
$ pkg-config --list-all
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
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
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
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
Code: Select all
$ g++ `pkg-config --cflags --libs irrlicht-1.2` -o example main.cpp
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
The classic makefile you posted above can still be used. pkg-config is just an add-on, a convenient tool, widely used.
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.
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.
-
- Posts: 279
- Joined: Fri Dec 24, 2004 6:37 pm
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!
Code: Select all
./configure
make
make install
Open Source all the way, baby
OSRPG
OSRPG
apt-get installkornerr wrote:What can be simpler?Code: Select all
./configure make make install
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
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.kornerr wrote:What can be simpler?Code: Select all
./configure make make install
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).
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:
'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.
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
Double-Click Setup.exe???kornerr wrote:What can be simpler?Code: Select all
./configure make make install
Last edited by Spintz on Sun Mar 04, 2007 2:34 pm, edited 1 time in total.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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.
-
- Posts: 277
- Joined: Thu Dec 15, 2005 6:11 pm
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??Spintz wrote:Double-Click Setup.exe???kornerr wrote:What can be simpler?Code: Select all
./configure make make install
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
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
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