KDevelop and SDL_ttf

Hi,

Is anyone developing in KDevelop and can help give me an idea of how to set
up the additional libraries? I got it recognizing SDL by adding
Project->Options->Linker Options->Additional
Libraries -lpthread -L/usr/lib -lSDL however now I want to add the SDL_ttf
library and can’t get it to recognise it. I
tried: -lfreetype -lpthread -L/usr/lib -lSDL -lSDL_ttf but doesn’t seem to
work. I am not sure which file defines the lib name so did I get the name
wrong or is something missing?

Thanks,
Julie.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!
I always use kdevelop for my c++ programming. Sadly I have not used the
autoconf of KDevelop for any SDL_ttf programs yet, but in my custom makefiles
i use these flags:
CFLAGS=-W -Wall -ggdb sdl-config --cflags
And link with these libraries
LIBS = -lm -sdl-config --libs -lSDL_ttf

You can check the whole makefiles and programs that use SDL_ttf on my page
www.marix-world.de Just take a look at the Projects SGUI and Brandubh
(actually Brandubh does make use of SDL_ttf via SGUI).
You should be all fine if setting -lSDL_ttf in the additinal libraries
section.

Sorry it took so long to reply, but at work I did not have access to a linux
or other pc running KDevelop. (Note to self: Finally get that laptop. Are
them Toshiba Satelite 5200s good?)

good luck
Matthias


Matthias Bach | GPG/PGP-Key-ID: 0xACA73EC9
www.marix-world.de | On Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/N8t4lnJmS6ynPskRAvxpAJ0fh26W2AOwU71xpIS5IsnxTA2wUQCeJRwh
oXdJP+uqKIiCEs4Ak1KJqIs=
=U3Od
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi again!Am Montag, 11. August 2003 18:59 schrieb Matthias Bach:

And link with these libraries
LIBS = -lm -sdl-config --libs -lSDL_ttf

Sorry, i missed that you were already linking with -lSDL_ttf.
Is your libSDL_ttf.so in the correct path (/usr/lib)?

I hope this helps
Marix


Matthias Bach | GPG/PGP-Key-ID: 0xACA73EC9
www.marix-world.de | On Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/N//DlnJmS6ynPskRAgY0AJ4vKJdrj6kKEJaEhNuRTQJk4MEn1wCfdM4A
HD+8RgapZxHKVFtUrhf4Y7A=
=d7Tu
-----END PGP SIGNATURE-----

Hi there,

My lib path for ttf is the same as my lib path for SDL. My Additional
Libraries reads as:

-lfreetype -L/usr/local/lib -lSDL -lpthread -L/usr/X11R6/lib -lxine -lSDL_tt
f

SDL works and xine works but SDL_ttf doesn’t…

I also have in the Compiler Options->Flags and Warnings->C++ Compiler Flags
the following:

-l/usr/local/src/SDL-1.2.5/include

I thought I should probably add one for ttf, but then the linker fails. Not
sure…

Thanks,
Julie.

Hi!

Am Mittwoch, 13 August 2003 schrieben Sie:

My lib path for ttf is the same as my lib path for SDL.

Mmh, do you have a link from libSDL_ttf.so to the actual .so?

I also have in the Compiler Options->Flags and Warnings->C++ Compiler
Flags
the following:

-l/usr/local/src/SDL-1.2.5/include

Actually you should always use sdl-config --cflags to maintain
the flags for all SDL projects. Acutally you should not need aditional
flags for SDL_ttf.
You also should use sdl-config --libs to get -lSDL

What was the error you were getting when trying to link with -SDL_ttf?
I don’t have your original message here right now, but it might be
interesting to know.

Another question. What distribution are you using?
Sorry if some of these were already answered.
Happy coding
Matthias

Hi again,

OK - I tried putting ‘sdl-config --libs’ in Compiler Options->Flags and
Warnings->C++ Compiler Flags and now I get:

g++:cannot specify -o with -c or -S and multiple compilations

and that’s without including the SDL_ttf header file…

Before it was not recognising SDL_ttf.h

Just changed it back to the way it was so I can still use SDL, and now it
won’t recognise SDL.h, hmmmm, help!!

Should I also mention that in Compiler Options->Linker Flags->Additional
Flags I have:

-L/usr/local/lib

I was reading on the internet how to link the libraries and ended up with a
hybrid of stuff people had posted and am not really sure what the correct
setup is…

Cheers,
Julie

Hi!

Am Donnerstag, 14 August 2003 schrieben Sie:

OK - I tried putting ‘sdl-config --libs’ in Compiler Options->Flags
and
Warnings->C++ Compiler Flags and now I get:

g++:cannot specify -o with -c or -S and multiple compilations

Actually it should work if you use backticks (that’s them little
french thingies) that look like this ` (might be a deadkey, so you
have to press space afterwards) and not the usual hyphon '.

Before it was not recognising SDL_ttf.h

Did you include SDL_ttf.h or <SDL/SDL_ttf.h>? Is SDL_ttf.h really
in the correct path?

Just changed it back to the way it was so I can still use SDL,
and now it
won’t recognise SDL.h, hmmmm, help!!

Strange, something must have changed.

Should I also mention that in Compiler Options->Linker Flags->Additional
Flags I have:

-L/usr/local/lib

Well, this will make the compiler look for libraries in /usr/local/lib.
I am not sure whether the complier will still check in /usr/lib,
but if all you *.so are in /usr/lib and you pass -L/usr/local/lib
that for sure will explain why you can’t find the libs. If your libraries
are in the default path you should not need this option.

Maybe you can send you project to my mail address and I will check
whether I can get a configuration that runs on my mashine.

regards,
Matthias