Today I installed allegro 5.as the a link.
But When I start to write a very simple code.
When I compiled using "g++ allegro_test.cpp -o output.out pkg-config --libs allegro5.0"
it returns that allegro undefined reference to al install system
.
When I use pkg-config --cflags --libs allegro-5.0
.
It only returns -lallegro
.
What can I do to solve this problem?
Asked
Active
Viewed 116 times
0

Chenlin Zhang
- 37
- 3
1 Answers
0
Is this a typo? It only returns -lallergo
?
Try to compile with: g++ allegro_test.cpp -o output.out -lallegro

Ferenc Deak
- 34,348
- 17
- 99
- 167
-
yes it only returns -lallergo.I suppose there may be something wrong when it is set up. – Chenlin Zhang Feb 14 '14 at 08:48
-
You mean it returns alleRGo not alleGRo? – Ferenc Deak Feb 14 '14 at 08:58
-
sorry it's my mistake. – Chenlin Zhang Feb 14 '14 at 09:10
-
I try to compiler with "g++ allegro_test.cpp -o output.out -lallegro".but still can't compile it. – Chenlin Zhang Feb 14 '14 at 10:49