c++ - How do I link Allegro 5 from my Makefile? -


i need link allegro game development library makefile. when this, compiler returns:

undefinied reference < function name >. 

before trying embed compilation line makefile, make sure understand how command line, , more important, make sure works:

g++ hello.cpp -o hello -i/usr/include/allegro5 -l/usr/lib -lallegro 

then, simple makefile compile hello.cpp be:

cxx=g++ cflags= ldflags=-l/usr/lib -lallegro include=-i. -i/usr/include/allegro5  objs=hello.o out=hello  all: hello_rule  clean:         rm -rf *.o hello  hello_rule: $(objs)         $(cxx) $(objs) -o $(out) $(include) $(cflags) $(ldflags) 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -