dave_567
March 6th, 2007, 02:24 AM
This should be a simple question for the right people. I'm trying to compile the example programs from the SDL_gfx library.
Source web page:
http://www.ferzkopp.net/joomla/content/view/19/14/
I'm not able to get the example to compile. I have installed the library from the package manager, copied the examples into a shared directory, and created the following make file.
# the compiler to use
CC = gcc
# Compiler flags
#CFLAGS = #-Wall -ansi
# Libraries to include
LIBS = -lSDL -lSDL_gfxPrimitives
# Folders to search for header files
INCLUDE = -I/usr/include/SDL -I/usr/include/SDL_gfxPrimitives
# Source file
SOURCES = SDL_gfxPrimitives.c
# Converts all source file names to object file names
OBJS = ${SOURCES:.c=.o}
# final executable name
PACKAGE = Primitives
################################################## ###
# getting things to compile and link
all : ${OBJS}
${CC} ${OBJS} -o ${PACKAGE} ${INCLUDE} ${LIBS}
.c.o:
${CC} ${CFLAGS} ${INCLUDE} -c ${SOURCES}
and the header from the source code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "SDL.h"
#include "SDL_gfxPrimitives.h"
I get the following error when I run the make file:
make
gcc TestGfxPrimitives.o -o Primitives -I/usr/include/SDL -I/usr/include/SDL_gfxPrimitives -lSDL -lSDL_gfxPrimitives
/usr/bin/ld: cannot find -lSDL_gfxPrimitives
collect2: ld returned 1 exit status
make: *** [all] Error 1
What am I missing here??? :confused:
Source web page:
http://www.ferzkopp.net/joomla/content/view/19/14/
I'm not able to get the example to compile. I have installed the library from the package manager, copied the examples into a shared directory, and created the following make file.
# the compiler to use
CC = gcc
# Compiler flags
#CFLAGS = #-Wall -ansi
# Libraries to include
LIBS = -lSDL -lSDL_gfxPrimitives
# Folders to search for header files
INCLUDE = -I/usr/include/SDL -I/usr/include/SDL_gfxPrimitives
# Source file
SOURCES = SDL_gfxPrimitives.c
# Converts all source file names to object file names
OBJS = ${SOURCES:.c=.o}
# final executable name
PACKAGE = Primitives
################################################## ###
# getting things to compile and link
all : ${OBJS}
${CC} ${OBJS} -o ${PACKAGE} ${INCLUDE} ${LIBS}
.c.o:
${CC} ${CFLAGS} ${INCLUDE} -c ${SOURCES}
and the header from the source code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "SDL.h"
#include "SDL_gfxPrimitives.h"
I get the following error when I run the make file:
make
gcc TestGfxPrimitives.o -o Primitives -I/usr/include/SDL -I/usr/include/SDL_gfxPrimitives -lSDL -lSDL_gfxPrimitives
/usr/bin/ld: cannot find -lSDL_gfxPrimitives
collect2: ld returned 1 exit status
make: *** [all] Error 1
What am I missing here??? :confused: