【问题标题】:Allegro 5 and FreeBASIC快板 5 和 FreeBASIC
【发布时间】:2017-03-13 19:49:22
【问题描述】:

我找不到使 Allegro5 在 Windows 上与 FreeBasic 一起工作的方法。
我下载并安装了 FreeBASIC-1.05.0-win32.exe。
我下载了 Allegro 二进制文件 allegro-5.0.10-mingw-4.7.0。
安装的 fbc 版本是独立版本。 我创建了 allegrolibs 文件夹并将这些库从 Allegro 发行版复制到 allegrolibs:

  liballegro_5.0.10-md.a  
  liballegro_font-5.0.10-md.a  
  liballegro_ttf-5.0.10-md.a  

我从 Allegro 发行版中添加了必要的 allegro dll 到示例/图形/allegro:

  allegro_font-5.0.10-md.dll  
  allegro_ttf-5.0.10-md.dll  
  allegro-5.0.10-md.dll

我从命令行运行 fbc,尝试从 examples/graphics/allegro5 编译 hello.bas:

 fbc -s gui -p allegrolibs examples/graphics/allegro5/hello.bas

程序编译得很好。
但是,在运行时 hello.exe 向我显示此错误:

  The program can't start because libgcc_s_dw2_1.dll is missing from your computer. 

将FreeBASIC\bin\win32中的libgcc_s_dw2_1.dll复制到hello.exe所在的文件夹,然后运行:

  The program can't start because libstdc++-6.dll is missing from your computer.  

从 ming4.7.0 二进制发行版中添加 libstdc++-6.dll 然后运行:

  The program can't start because libgcc_s_sjlj-1.dll is missing from your computer.  

从ming4.7.0二进制分发中添加libgcc_s_sjlj-1.dll然后运行:

  The program can't start because libwinpthread-1.dll is missing from your computer.  

从ming4.7.0二进制分发中添加libwinpthread-1.dll然后运行:

  The procedure entry point __gxx_personality_v0 could not be located
  in the dynamic link library libstd++-6.dll.

此时我被卡住了。我做错了什么?任何尝试过相同并能够解决它的人愿意帮助解决这个问题吗?

【问题讨论】:

    标签: windows dll allegro5 freebasic


    【解决方案1】:

    用于 Windows 的 allegro-5.0.10-mingw-4.7.0 二进制文件是使用 mingw-4.7.0 编译器编译的。
    freeBASIC 是用 mingw-w64 编译器编译的。 但就动态链接而言,它们可以一起工作。 Windows allegro-5.0.10-mingw-4.7.0 的二进制包包含两个文件:

    allegro-5.0.10-monolith-mt.dll
    liballegro-5.0.10-monolith-mt.a
    

    其中任何一个都可用于将 Allegro 5 库链接到 exe:
    将 allegro-5.0.10-monolith-mt.dll 或 liballegro-5.0.10-monolith-mt.a 复制到 allegrolib 文件夹中。 修改 allegro.bi、allegro_font.bi、allegro_ttf.bi 将第 35 行替换为:

    #inclib "allegro-5.0.10-monolith-mt" 
    

    从控制台运行:

    fbc -s gui -p allegrolib examples/graphics/allegro5/hello.bas
    

    allegro-5.0.10-monolith-mt.dll 需要和 hello.exe 放在同一个文件夹中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-19
      • 1970-01-01
      • 2011-06-13
      相关资源
      最近更新 更多