SDL_Layer : problème installation
Bonjour ! help please je commence à désespérer. Je veux installer SDL_Layer pour gérer les collisions facilement sans devoir taper 5 lignes de codes pour chaque pixel.
Apparemment on ne peut pas l'installer directement avec apt-get !? Donc j'ai téléchargé le paquet qu'il faut installer avec make. S'il vous plaît aidez moi...
Or la 1ère étape se passe bien :
Code:
1 2 3 4
| make -f Makefile.Linux
/usr/bin/gcc -Wall $(/usr/bin/sdl-config --cflags) -O3 -c *.car rcs libSDL_layer.a *.o
/usr/bin/gcc -Wall $(/usr/bin/sdl-config --cflags) -O3 -fPIC -c *.c
/usr/bin/gcc -shared -o libSDL_layer.so *.o $(/usr/bin/sdl-config --libs) |
-2ème étape : hé merde...:
Code:
1 2 3 4 5 6 7 8 9
| sudo make install
/usr/bin/gcc -Wall $(/usr/bin/sdl-config --cflags) -O3 -c *.c
ar rcs libSDL_layer.a *.o
/usr/bin/gcc -Wall $(/usr/bin/sdl-config --cflags) -O3 -fPIC -c *.c
/usr/bin/gcc -dynamiclib -o libSDL_layer.dylib *.o $(/usr/bin/sdl-config --libs)
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [all-dynamic] Erreur 1 |
Quelqu'un pourrait m'expliquer ce ce signifient ces messages d'erreur, je ne comprends pas !! Voici le fichier Makefile : (Merci d'avance !!!)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| # Change the install prefix
# if necessary
INSTALL_PATH=/usr/local
sdlconfig=$(shell which sdl-config)
gcc=$(shell which gcc)
ifeq ($(sdlconfig),)
$(error "I need sdl-config to compile")
endif
ifeq ($(gcc),)
$(error "I need gcc to compile")
endif
cflags=-Wall $$($(sdlconfig) --cflags) -O3
libs=$$($(sdlconfig) --libs)
all: all-static all-dynamic
all-static:
$(gcc) $(cflags) -c *.c
ar rcs libSDL_layer.a *.o
all-dynamic:
$(gcc) $(cflags) -fPIC -c *.c
$(gcc) -shared -o libSDL_layer.so *.o $(libs)
demos: all
\cd demos && $(MAKE)
install: all
@echo
@echo Installing all in $(INSTALL_PATH)
\cp -f SDL_Layer.h $(INSTALL_PATH)/include/SDL
\cp -f libSDL_layer.so $(INSTALL_PATH)/lib
\cp -f libSDL_layer.a $(INSTALL_PATH)/lib
@echo "Finished"
@echo
uninstall:
@echo
@echo "Uninstalling all from $(INSTALL_PATH)"
\rm -f $(INSTALL_PATH)/include/SDL/SDL_Layer.h
\rm -f $(INSTALL_PATH)/lib/libSDL_layer.so
\rm -f $(INSTALL_PATH)/lib/libSDL_layer.a
@echo "Finished"
@echo
doc:
\doxygen
docclean:
\rm -Rf doc/html
clean:
\rm -Rf *.o *.so *.a
.PHONY: demos doc |