Author Topic: Codeblocks + Allegro + Linux  (Read 8682 times)

rogih

  • Guest
Codeblocks + Allegro + Linux
« on: January 14, 2008, 01:38:22 am »
Hi guys

This is the first time that I'm trying compile an allegro game using codeblocks.

gcc main.c -o GameO `allegro-config --libs` works fine.

But i don't know how to compile using codeblocks.

I tried:

Project -> Build Options -> Linker -> Add then added these:
/usr/lib/liballeg-4.2.2.so
/usr/lib/liballeg.so.4.2
/usr/lib/allegro/4.2.2/alleg-alsadigi.so
/usr/lib/allegro/4.2.2/alleg-alsamidi.so
/usr/lib/allegro/4.2.2/alleg-artsdigi.so
/usr/lib/allegro/4.2.2/alleg-dga2.so
/usr/lib/allegro/4.2.2/alleg-esddigi.so
/usr/lib/allegro/4.2.2/alleg-fbcon.so
/usr/lib/allegro/4.2.2/alleg-jackdigi.so
/usr/lib/allegro/4.2.2/alleg-vga.so

Failed to compile

/usr/lib/liballeg.so.4.2: undefined reference to `_poly_zbuf_atex_mask_trans15'
/usr/lib/liballeg.so.4.2: undefined reference to `_poly_scanline_atex_mask_trans32'
/usr/lib/liballeg.so.4.2: undefined reference to `_poly_zbuf_ptex_trans8'
/usr/lib/liballeg.so.4.2: undefined reference to `_poly_scanline_grgb32'
/usr/lib/liballeg.so.4.2: undefined reference to `_poly_zbuf_ptex_lit24'
/usr/lib/liballeg.so.4.2: undefined reference to `_stub_unbank_switch'
/usr/lib/liballeg.so.4.2: undefined reference to `_linear_draw_trans_rle_sprite16'
/usr/lib/liballeg.so.4.2: undefined reference to `_poly_scanline_atex_trans32'
/usr/lib/liballeg.so.4.2: undefined reference to `_colorconv_blit_24_to_8'
...

also tried:

Project -> Build Options -> Other Options -> allegro-config --libs and
Project -> Build Options -> Other Options -> `allegro-config --libs`

/home/higor/Allegro/Allegro1/main.c:7: undefined reference to `_install_allegro_version_check'
/home/higor/Allegro/Allegro1/main.c:8: undefined reference to `install_keyboard'
/home/higor/Allegro/Allegro1/main.c:9: undefined reference to `set_color_depth'
/home/higor/Allegro/Allegro1/main.c:10: undefined reference to `set_gfx_mode'
/home/higor/Allegro/Allegro1/main.c:11: undefined reference to `allegro_message'
/home/higor/Allegro/Allegro1/main.c:12: undefined reference to `allegro_message'
/home/higor/Allegro/Allegro1/main.c:15: undefined reference to `makecol'
/home/higor/Allegro/Allegro1/main.c:15: undefined reference to `font'
/home/higor/Allegro/Allegro1/main.c:15: undefined reference to `screen'
/home/higor/Allegro/Allegro1/main.c:15: undefined reference to `textout_ex'
/home/higor/Allegro/Allegro1/main.c:16: undefined reference to `makecol'
/home/higor/Allegro/Allegro1/main.c:16: undefined reference to `font'
/home/higor/Allegro/Allegro1/main.c:16: undefined reference to `screen'
/home/higor/Allegro/Allegro1/main.c:16: undefined reference to `textout_ex'
/home/higor/Allegro/Allegro1/main.c:13: undefined reference to `key'
collect2: ld returned 1 exit status




Offline stahta01

  • Lives here!
  • ****
  • Posts: 7594
    • My Best Post
Re: Codeblocks + Allegro + Linux
« Reply #1 on: January 14, 2008, 01:53:02 am »
Did you try?

Project -> Build Options
"Linker Settings" Tab
Add it to box "Other Linker Options"

With it being the below string
`allegro-config --libs`

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

rogih

  • Guest
Re: Codeblocks + Allegro + Linux
« Reply #2 on: January 14, 2008, 01:59:04 am »
Did you try?

Project -> Build Options
"Linker Settings" Tab
Add it to box "Other Linker Options"

With it being the below string
`allegro-config --libs`



LoL

Sorry about this stupid question

Now its works ;)

Thanks man