Allegro库与Code Blocks mac osx

时间:2016-06-09 19:26:31

标签: macos codeblocks allegro

花了一些时间,在其他SO用户的帮助下,尝试在osx 10.10.5上安装Allegro库 最后似乎还可以,所以我打开代码块,粘贴示例代码(http://partitionseven.blogspot.com/2011/01/compiling-allegro-5-with-mac-os-x-snow.html),我在编译时遇到错误

y

当我按照教程完全运行

中的终端代码时
g++   -c /Users/lukasz/Desktop/test_allegro/test.cpp -o /Users/lukasz/Desktop/test_allegro/test.o
g++  -o /Users/lukasz/Desktop/test_allegro/test /Users/lukasz/Desktop/test_allegro/test.o   
Undefined symbols for architecture x86_64:
  "_al_clear_to_color", referenced from:
      __al_mangled_main in test.o
  "_al_create_display", referenced from:
      __al_mangled_main in test.o
  "_al_destroy_display", referenced from:
      __al_mangled_main in test.o
  "_al_flip_display", referenced from:
      __al_mangled_main in test.o
  "_al_install_system", referenced from:
      __al_mangled_main in test.o
  "_al_map_rgb", referenced from:
      __al_mangled_main in test.o
  "_al_rest", referenced from:
      __al_mangled_main in test.o
  "_main", referenced from:
     implicit entry/start for main executable
     (maybe you meant: __al_mangled_main)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

它有效 - 我有一个黑屏。但是如何使用Code Blocks来实现它呢?

0 个答案:

没有答案