Makefile (WAS:Re: Text output)

Viktor Stansvik wrote:

Hi!
Is there any standart way to utput text or does anyne have fubction such
as outtextxy(“text”,font,x,y,surface)?

There are several librarys providing text output. With SDL_ttf you can
load and display TrueType fonts.

Hm. I do not believe i have documentation on this Library! Can someone
suply me with documentation.

You can download the library here: http://www.libsdl.org/projects/SDL_ttf/ .
I don’t think there is any documentation for the library but if you just check
the source of the example program out you will understand. It’s very simple.

Ok thank you very much. But now i have another problem. I have decided
to make my graphics routiones to use jpg textures. And i found SDL_image,
and now i have trouble with my makefile. By defoult to compile SDL only
applications i use make file like this:

INCLUDE = -I. -I/usr/local/include/SDL/
LIBDIR = -L.

COMPILERFLAGS = -Wall -O2 -DSDL
CC = gcc
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBRARIES = -lm -lSDL -lpthread

all: hny

hny: hny.cpp
$(CC) $(CFLAGS) $(LIBRARIES) hny.cpp -o nhy

But when i included #include "SDL_image.h"
into hny.cpp. gcc gives my message like this

gcc -Wall -DSDL -I. -I/usr/local/include/SDL -lm -lSDL -lpthread hny.cpp
-o nhy
hny.cpp: In function ‘void fincolor()’:
hny.cpp:123: warning: ‘double’ used for argument 1 of ‘abs(int)’
/tmp/ccSUlgrv.o: In function ‘main’:
/tmp/ccSUIgrv.o(.text+0x659): undeclared referance to 'IMG_Load"
collect2: ld returned 1 exit status
make: *** [nhy] Error 1

So it seems tha something is wrong with my makefile. Please note, that
SDL_imahe.h is located in the /usr/local/include/SDL/, where all other
SDL headers are located, and showimage example seems to
compile fine.
So what did i did wrong&

Add this
LIBRARIES = -lm -lSDL -lpthread -lSDL_image
to your makefile…SDL_image is a library too…> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of
Vladimir Karpenko
Sent: Friday, September 27, 2002 8:07 PM
To: sdl at libsdl.org
Subject: Makefile (WAS:Re: [SDL] Text output)

Viktor Stansvik wrote:

Hi!
Is there any standart way to utput text or does anyne have fubction
such
as outtextxy(“text”,font,x,y,surface)?

There are several librarys providing text output. With SDL_ttf you
can load and display TrueType fonts.

Hm. I do not believe i have documentation on this Library! Can someone
suply me with documentation.

You can download the library here:
http://www.libsdl.org/projects/SDL_ttf/ . I don’t think there is any
documentation for the library but if you just check the source of the
example program out you will understand. It’s very simple.

Ok thank you very much. But now i have another problem. I have decided
to make my graphics routiones to use jpg textures. And i found
SDL_image, and now i have trouble with my makefile. By defoult to
compile SDL only
applications i use make file like this:

INCLUDE = -I. -I/usr/local/include/SDL/
LIBDIR = -L.

COMPILERFLAGS = -Wall -O2 -DSDL
CC = gcc
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBRARIES = -lm -lSDL -lpthread

all: hny

hny: hny.cpp
$(CC) $(CFLAGS) $(LIBRARIES) hny.cpp -o nhy

But when i included #include "SDL_image.h"
into hny.cpp. gcc gives my message like this

gcc -Wall -DSDL -I. -I/usr/local/include/SDL -lm -lSDL -lpthread hny.cpp

-o nhy
hny.cpp: In function ‘void fincolor()’:
hny.cpp:123: warning: ‘double’ used for argument 1 of ‘abs(int)’
/tmp/ccSUlgrv.o: In function ‘main’:
/tmp/ccSUIgrv.o(.text+0x659): undeclared referance to 'IMG_Load"
collect2: ld returned 1 exit status
make: *** [nhy] Error 1

So it seems tha something is wrong with my makefile. Please note, that
SDL_imahe.h is located in the /usr/local/include/SDL/, where all other
SDL headers are located, and showimage example seems to
compile fine.
So what did i did wrong&


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi!
A tip:

Try to include -lSDL_image

/Patrich
fre 2002-09-27 klockan 18.19 skrev Paolo Gavocanov (cTh):> Add this

LIBRARIES = -lm -lSDL -lpthread -lSDL_image
to your makefile…SDL_image is a library too…

-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org] On Behalf Of
Vladimir Karpenko
Sent: Friday, September 27, 2002 8:07 PM
To: sdl at libsdl.org
Subject: Makefile (WAS:Re: [SDL] Text output)

Viktor Stansvik wrote:

Hi!
Is there any standart way to utput text or does anyne have fubction
such
as outtextxy(“text”,font,x,y,surface)?

There are several librarys providing text output. With SDL_ttf you
can load and display TrueType fonts.

Hm. I do not believe i have documentation on this Library! Can someone
suply me with documentation.

You can download the library here:
http://www.libsdl.org/projects/SDL_ttf/ . I don’t think there is any
documentation for the library but if you just check the source of the
example program out you will understand. It’s very simple.

Ok thank you very much. But now i have another problem. I have decided
to make my graphics routiones to use jpg textures. And i found
SDL_image, and now i have trouble with my makefile. By defoult to
compile SDL only
applications i use make file like this:

INCLUDE = -I. -I/usr/local/include/SDL/
LIBDIR = -L.

COMPILERFLAGS = -Wall -O2 -DSDL
CC = gcc
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBRARIES = -lm -lSDL -lpthread

all: hny

hny: hny.cpp
$(CC) $(CFLAGS) $(LIBRARIES) hny.cpp -o nhy

But when i included #include "SDL_image.h"
into hny.cpp. gcc gives my message like this

gcc -Wall -DSDL -I. -I/usr/local/include/SDL -lm -lSDL -lpthread hny.cpp

-o nhy
hny.cpp: In function ‘void fincolor()’:
hny.cpp:123: warning: ‘double’ used for argument 1 of ‘abs(int)’
/tmp/ccSUlgrv.o: In function ‘main’:
/tmp/ccSUIgrv.o(.text+0x659): undeclared referance to 'IMG_Load"
collect2: ld returned 1 exit status
make: *** [nhy] Error 1

So it seems tha something is wrong with my makefile. Please note, that
SDL_imahe.h is located in the /usr/local/include/SDL/, where all other
SDL headers are located, and showimage example seems to
compile fine.
So what did i did wrong&


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl