我正在尝试按照https://developers.google.com/optimization/introduction/installing.html#windows_binary上的说明进行操作,以便可以在 C# 应用程序中使用 or-tools。
我被困在make all
台阶上了。我在开发人员命令提示符中,但是这个命令说:
'make' is not recognized as an internal or external command,
operable program or batch file.
我尝试下载 GNU make,但也失败了。make install
说“没有目标”,一个光秃秃的make
说:
process_begin: CreateProcess(NULL, cl /EHsc /MD /nologo /D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -nologo /O2 -DNDEBUG -DUSE_CBC -DUSE_CLP /D__WIN32__ /Iinclude\src\windows /DGFLAGS_DLL_DECL= /DGFLAGS_DLL_DECLARE_FLAG= /DGFLAGS_DLL_DEFINE_FLAG= /Iinclude /Iexamples -DUSE_GLOP -DUSE_BOP -c examples\cpp\costas_array.cc /Foobjs\costas_array.obj, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [objs\\costas_array.obj] Error 2
我还尝试将文件夹中的 DLLbin
直接复制到我的项目中。我可以通过这样做来针对它们进行编译,但是当我尝试运行它时出现错误:
System.BadImageFormatException: 'Could not load file or assembly 'Google.OrTools, Version=5.1.6235.37215, Culture=neutral, PublicKeyToken=7a052e3db761d3be' or one of its dependencies. An attempt was made to load a program with an incorrect format.'
我错过了什么?