![]() |
|
Fedora 33 and allegro-devel install problem |
Bob Keane
Member #7,342
June 2006
|
I installed(?) allegro 5 using dnf on Fedora and thought things went well. After configuring code::blocks I tried compiling a simple program but got linking errors. I tried reinstalling and most of the packages were installed except allegro-devel. I believe I got a no such package error. I tried compiling from the command line, got errors related to allegro-devel and was prompted to install, so I said yes. the compile failed. Errors are: gcc main.c `allegro-config --libs` /usr/bin/ld: /tmp/ccbuDCqo.o: in function `main': main.c:(.text+0x14): undefined reference to `al_install_system' /usr/bin/ld: main.c:(.text+0x34): undefined reference to `al_init_primitives_addon' /usr/bin/ld: main.c:(.text+0x74): undefined reference to `al_create_display' /usr/bin/ld: main.c:(.text+0xb3): undefined reference to `al_set_target_backbuffer' /usr/bin/ld: main.c:(.text+0xc7): undefined reference to `al_map_rgb' /usr/bin/ld: main.c:(.text+0xed): undefined reference to `al_clear_to_color' /usr/bin/ld: main.c:(.text+0x101): undefined reference to `al_map_rgb' /usr/bin/ld: main.c:(.text+0x19a): undefined reference to `al_draw_ellipse' /usr/bin/ld: main.c:(.text+0x19f): undefined reference to `al_flip_display' /usr/bin/ld: main.c:(.text+0x1b0): undefined reference to `al_rest' /usr/bin/ld: main.c:(.text+0x1bc): undefined reference to `al_destroy_display' collect2: error: ld returned 1 exit status This leads me to believe the package is not installed or installed correctly. Am I correct? I can remove and reinstall but if there is something else going on, I'd like to find out. Thx By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Peter Hull
Member #1,136
March 2001
|
allegro5-devel surely?
|
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
You're linking wrong. You should be using pkg-config, not allegro-config My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Bob Keane
Member #7,342
June 2006
|
I'm pretty sure my system is messed up. I'm going to try a few other things and see what happens. Peter? {"name":"612942","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/0\/40e4901094aecd40353514562a599b12.jpg","w":300,"h":168,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/0\/40e4901094aecd40353514562a599b12"} By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Peter Hull
Member #1,136
March 2001
|
Bob - not sure what you meant with that image. I was in a rush with my poist but the point was to make sure you were installing allegro5-devel and not allegro-devel. Using allegro-config (which is provided by the latter) is going to pass Allegro 4 libs into the the linker and that might account for the missing symbols you see listed.
|
Bob Keane
Member #7,342
June 2006
|
Peter, I did not notice the difference between the package you posted and what I thought I was using. I thought I sensed a little sarcasm, sorry. Still trying a few things, but confused why code::blocks does not work. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Peter Hull
Member #1,136
March 2001
|
Good stuff! I have Fedora 34 in a VM so if you haven't fixed it I can have a look, though I'm not a code::blocks user. Will be tomorrow probably.
|
Bob Keane
Member #7,342
June 2006
|
I'm still looking into using code::blocks to make compiling easier. In the meantime, here is the code attached. What would be the terminal command to compile? I want to check my installation. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
Peter Hull
Member #1,136
March 2001
|
I compiled your main.c with cc -o main -O2 -g main.c $(pkg-config --libs --cflags allegro-5 allegro_primitives-5)
(this was on Fedora 34, but I don't believe 33 would be any different) $ dnf list installed |grep allegro allegro.x86_64 4.4.3.1-5.fc34 @fedora allegro-devel.x86_64 4.4.3.1-5.fc34 @fedora allegro5.x86_64 5.2.4-7.fc34 @fedora allegro5-addon-image.x86_64 5.2.4-7.fc34 @fedora allegro5-addon-image-devel.x86_64 5.2.4-7.fc34 @fedora allegro5-devel.x86_64 5.2.4-7.fc34 @fedora
|
Bob Keane
Member #7,342
June 2006
|
Thanks, I'll give it a shot. I did upgrade to Fedora 34 recently, I forgot to note in the thread. EDIT2: EDIT3: Nevermind, found it thanks. By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul. |
|