# Newbi question

**URL:** <https://discourse.libsdl.org/t/newbi-question/9097>\
**Category:** SDL Development\
**Created:** [July 27, 2003, 10:11am UTC](https://discourse.libsdl.org/t/newbi-question/9097 "2003-07-27T10:11:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike\_masino](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/m/ee59a6/32.png) [@mike\_masino](https://discourse.libsdl.org/u/mike_masino)\
**Post date:** [July 27, 2003, 10:11am UTC](https://discourse.libsdl.org/t/newbi-question/9097/1 "2003-07-27T10:11:01Z")

</div>

What are people using in Linux for SDL development. Im new to coding in  
this environment and  
so far have been using vim and the G++ compiler from in an xterm command  
line. Any suggestions  
would be great. Do you write your own Makefiles or use autoconf/automake  
to generate these?

---

<div class="post-metadata">

**Author:** ![Walter\_Weber-Gross](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/w/e274bd/32.png) [@Walter\_Weber-Gross](https://discourse.libsdl.org/u/Walter_Weber-Gross)\
**Post date:** [July 27, 2003, 11:55am UTC](https://discourse.libsdl.org/t/newbi-question/9097/2 "2003-07-27T11:55:00Z")

</div>

Hi Mike,

you can use kdevelop, e.g.

But i compile my project basically with

gcc .c -o `sdl-config --libs` `sdl-config --cflags` -lm  
-lSDL\_image

sdl-config generates needed gcc args.

-lSDL\_image is needed for using IMG\_Load() where you have to #include  
\<SDL/SDL\_image.h\>

For editing i recommend jEdit ([www.jedit.org](http://www.jedit.org)) a powerful editor written in  
Java.

For debugging i compile my project with the -ggdb compiler option. After that  
i start ddd, a graphical debugger which itself uses gdb.

I use this simple makefile template:

[makefile on]  
: .c .h  
gcc -ggdb .c -o `sdl-config --libs` `sdl-config --cflags` -lm -lSDL\_image

09: .c .h  
gcc -O9 .c -o `sdl-config --libs` `sdl-config --cflags`  
-lm -lSDL\_image

.PHONEY: clean debug

clean:  
rm -f \*.o

debug:  
ddd &

[makefile off]

If you debug your SDL-prog (make debug) i recommend not to use full screen  
mode (SDL\_FULLSCREEN).\> What are people using in Linux for SDL development. Im new to coding in

> this environment and  
> so far have been using vim and the G++ compiler from in an xterm command  
> line. Any suggestions  
> would be great. Do you write your own Makefiles or use autoconf/automake  
> to generate these?

---

<div class="post-metadata">

**Author:** ![Jason\_Wood](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/3bc359/32.png) [@Jason\_Wood](https://discourse.libsdl.org/u/Jason_Wood)\
**Post date:** [July 27, 2003, 12:44pm UTC](https://discourse.libsdl.org/t/newbi-question/9097/3 "2003-07-27T12:44:01Z")

</div>

> What are people using in Linux for SDL development. Im new to coding in  
> this environment and so far have been using vim and the G++ compiler from in  
> an xterm command line.

Personally, I use vim as my editor, and the g++ compiler from in an xterm  
command line 😉 Well, I use make rather than g++ directly…

I think it depends on what development style you like. If you want to use an  
IDE, then I recommend KDevelop, although I have not used it to code SDL  
applications.

> **[KDevelop - A cross-platform IDE for C, C++, Python, QML/JavaScript and PHP](https://kdevelop.org/)**
>
> A cross-platform IDE for C, C++, Python, QML/JavaScript and PHP

If you prefer a plain old editor, there are plenty to choose from and the only  
real suggestion I can give is to try a couple until you find one you like. My  
favorites are

- Vim. Your already using it so know what it’s like. Has pretty much every  
feature under the sun if you know where to look for them - e.g. Ctrl-P whilst  
typing a word for autocompletion, type :make to make your project whilst  
inside vim, and then use :cnext and :cprevious to move to the line with a  
compile error on. p.s. I’m a vim fanatic 😉

- Kate (KDE Avanced Text Editor). Part of KDE, a very nice editor, has a  
directory browser along the side to select files which is very useful when  
your editing lots of source files, lots of programmer-related features such  
as syntax highlighting, smart indentation, etc. Has a built in x term, which  
can optionally stay synchronised with your current working directory - useful  
for typing ‘make’ 😉

> Any suggestions would be great. Do you write your own Makefiles or use  
> autoconf/automake to generate these?

How grandiose are your ideas? 🙂 If you are planning on writing anything that  
will grow to a reasonable size, I would recommend using autoconf/automake as  
it will save you time in the long run - especially if you are interested in  
other people compiling your code on various distros/operating systems.

When I started my project, I found a great .tgz on the web that contained a  
template project (fill in your project name and away you go) for autoconf and  
libSDL, as well as scripts to cross-compile the project for windows from  
linux, which was of interest to me at the time. I did a quick google search,  
and I believe that this is the site :

[http://david.acz.org/sdl.html](http://david.acz.org/sdl.html)

Hope that helps,

Cheers,  
JasonOn Saturday 26 Jul 2003 8:20 pm, mike masino wrote:

–  
Jason Wood  
Homepage : [www.uchian.pwp.blueyonder.co.uk](http://www.uchian.pwp.blueyonder.co.uk)

---

<div class="post-metadata">

**Author:** ![Karl\_St-Jacques](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@Karl\_St-Jacques](https://discourse.libsdl.org/u/Karl_St-Jacques)\
**Post date:** [July 27, 2003, 1:11pm UTC](https://discourse.libsdl.org/t/newbi-question/9097/4 "2003-07-27T13:11:01Z")

</div>

> What are people using in Linux for SDL development. Im new to coding in  
> this environment and  
> so far have been using vim and the G++ compiler from in an xterm command  
> line. Any suggestions  
> would be great. Do you write your own Makefiles or use autoconf/automake  
> to generate these?

I personaly use Emacs with G++, i’ve run autoconf and automake after like 2  
day of reading at the GNU website, and it’s run fine. But the learning curve  
to use autoconf and automake is quite hard. but you can search related topic  
to help you, like autoscan (that make a basic template for autoconf),  
aclocal, autoheader. But i’m out of topic now.

I’ve tried kdevelop but didn’t get any success with it (didn’t generate  
makefile for me, crash at random time, etc so i can’t give a good advice  
about it.)

As for vi i just didn’t take the time to learn how to use it.

As long as you are happy with your coding environement, there’s no problem  
🙂

Karl.\>From: “mike masino” \<mike.masino at ces.uwex.edu\>

> Reply-To: sdl at [libsdl.org](http://libsdl.org)  
> To:   
> Subject: [SDL] newbi question  
> Date: Sat, 26 Jul 2003 14:20:30 -0500

* * *

STOP MORE SPAM with the new MSN 8 and get 2 months FREE\*  
[http://join.msn.com/?page=features/junkmail](http://join.msn.com/?page=features/junkmail)

---

<div class="post-metadata">

**Author:** ![Jeff\_Post](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/b9bd4f/32.png) [@Jeff\_Post](https://discourse.libsdl.org/u/Jeff_Post)\
**Post date:** [July 27, 2003, 1:51pm UTC](https://discourse.libsdl.org/t/newbi-question/9097/5 "2003-07-27T13:51:00Z")

</div>

Everyone has their favorite editor, chosen by criteria that are highly  
subjective. Personally, I like NEdit, but ymmv.

I write makefiles so that I can compile for Linux or Windows, and then type:  
make ; to build for normal users  
make win ; to build for users who think Windows is a real OS

If you do a complex enough project, you should probably use  
autoconf/automake, but I haven’t had the need so far.

Have fun,  
JOn Saturday 26 July 2003 12:20 pm, mike masino wrote:

> so far have been using vim and the G++ compiler from in an xterm command  
> line. Any suggestions  
> would be great. Do you write your own Makefiles or use autoconf/automake  
> to generate these?

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [July 27, 2003, 6:51pm UTC](https://discourse.libsdl.org/t/newbi-question/9097/6 "2003-07-27T18:51:01Z")

</div>

Please reply directly to the author. This is off topic.

Thanks,  
-Sam Lantinga, Software Engineer, Blizzard Entertainment

---

<div class="post-metadata">

**Author:** ![Sam\_Hart](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/d26b3c/32.png) [@Sam\_Hart](https://discourse.libsdl.org/u/Sam_Hart)\
**Post date:** [July 27, 2003, 7:06pm UTC](https://discourse.libsdl.org/t/newbi-question/9097/7 "2003-07-27T19:06:01Z")

</div>

> > What are people using in Linux for SDL development. Im new to coding in  
> > this environment and so far have been using vim and the G++ compiler from in  
> > an xterm command line.
> 
> Personally, I use vim as my editor, and the g++ compiler from in an xterm  
> command line 😉 Well, I use make rather than g++ directly…

(hey, there’s nothing wrong with using vim, nano, etc, from the command  
line to code… dunno why people think they have to have an  
alternative…)

Throwing in my two cents, I personally like Kate. Kate allows you to  
have a list of all openned files that you can use shortcut keys to cycle  
through in this pseudo-project format. Plus it has all the syntax  
highlighting you’d want… for nearly any language.

However, I’ll admit I love Nano with it’s new syntax highlighting and  
regex features.

> I think it depends on what development style you like. If you want to use an  
> IDE, then I recommend KDevelop, although I have not used it to code SDL  
> applications.
> 
> [http://www.kdevelop.org](http://www.kdevelop.org)

I just wanted to point out that I have a rather outdated HOWTO on  
KDevelop+SDL here: [http://www.geekcomix.com/snh/files/docs/sdl-kdev/](http://www.geekcomix.com/snh/files/docs/sdl-kdev/)

However, like I said, it’s really outdated as I no longer use KDevelop.  
The nice thing about KDevelop is that it can do project file management  
for you and integrate with things like CVS. The problem is that, out of  
the box, it doesn’t integrate well into an SDL project (at least, it  
used to not… could be better now 😉

What I was wondering was: Would anyone else on this list who uses  
KDevelop+SDL care to take over maintenance of this mini-HOWTO? (And  
bring it up-to-date… I really hate to see it languishing on my site  
😉 If so… contact me.On Sun, 2003-07-27 at 12:42, Jason Wood wrote:

> On Saturday 26 Jul 2003 8:20 pm, mike masino wrote:

–  
Sam Hart -  
PERSONAL @Sam_Hart | [http://www.geekcomix.com/snh/](http://www.geekcomix.com/snh/)  
WORK hart at physics.arizona.edu | [http://geekcomix.com/classnotes/](http://geekcomix.com/classnotes/)  
TUX4KIDS criswell at [tux4kids.net](http://tux4kids.net) | [http://www.tux4kids.org/](http://www.tux4kids.org/)  
BIGMAN sam at [bigmannetworks.com](http://bigmannetworks.com) | [http://www.bigmannetworks.com/](http://www.bigmannetworks.com/)
