【发布时间】:2016-02-04 02:43:12
【问题描述】:
我需要你的帮助。
我已经在 Windows 8 上安装了用于开发基于约束的系统和应用程序的工具包Gecode 4.4.0,还有编译器 C++ Dev C++ 5.9.2,但我仍然不知道如何运行我的第一个程序或安装提供的示例。
我听说我需要一个 make 文件,但实际上我还没有成功编译或执行。
编译命令:
g++.exe -D__DEBUG__ main.o sat.o -o TestGecode.exe -L"C:/Program Files (x86)/Dev-Cpp/MinGW64/lib32"-L"C:/程序文件 (x86)/Dev-Cpp/MinGW64/x86_64-w64-mingw32/lib32"-static-libgcc -L"C:/Program Files (x86)/Gecode/include" -m32 -g3
输出错误:
sat.o:在函数
ZN6Gecode9ExceptionD2Ev': c:/program files (x86)/dev-cpp/mingw64/x86_64-w64-mingw32/include/gecode/support/exception.hpp:46: undefined reference to_imp___ZTVN6Gecode9ExceptionE' sat.o:在 函数ZN6Gecode15MemoryExhaustedC1Ev': c:/program files (x86)/dev-cpp/mingw64/x86_64-w64-mingw32/include/gecode/support/exception.hpp:90: undefined reference to_imp___ZN6Gecode9ExceptionC2EPKcS2_' sat.o:在 函数`ZNK6Gecode9PosChoice7archiveERNS_7ArchiveE': ...
【问题讨论】:
-
看起来很像您没有将开发工具指向 Gecode 库。不确定如何使用 DevC++ 执行此操作,但它应该有很好的文档记录。尝试将“dev c++ add library to project”添加到您的网络搜索选项中,看看会出现什么结果。
-
它已经指向 Gecode 库。
标签: c++ constraints windows-8.1 gecode