【VS/GUROBI】configure a new Gurobi C++ project with Microsoft Visual Studio 2015

【精简版】

1.配置:release;x64

PS:VS菜单栏中也注意修改


2.C/C++:

常规-》附加包含目录:

C:\gurobi701\win64\include


代码生成-》运行库【默认】:

多线程调试 DLL (/MDd)


3.链接器:输入(注意与2中一致)

C:\gurobi701\win64\lib\gurobi70.lib;C:\gurobi701\win64\lib\gurobi_c++ mdd2015.lib;%(AdditionalDependencies)


【官网原文】

It's easiest to modify one of the existing projects in the examples\build subdirectory. However, if you prefer to create a new project from scratch, here are the key steps:
  1. Under the File menu, select New > Project...; on the Installed Templates panel, select Other Languages > Visual C++ > Win32, then select Win32 Console Application. For illustration, let's call it gurobitest. Press the Finish button to close the Wizard.
  2. To add an existing source file:
    • Under Source Files below the project name in the Solution Explorer panel, right click on the initial source file that Visual Studio adds to the project (gurobitest.cpp in our example). Select Remove, then press Delete.
    • Right-click on the project name in the Solution Explorer panel, then select Add > Existing Item..., then choose your C++ source file.
  3. Right-click on the project name in the Solution Explorer panel, then select Properties.
  4. For 32-bit Gurobi libraries:
    • Set Platform to Win32 (if not already selected)
    • Under C/C++ / General / Additional Include Directories, add: c:\gurobi701\win32\include
    • Under Linker / General / Additional Library Directories, add: c:\gurobi701\win32\lib
  5. For 64-bit Gurobi libraries:
    • Set Platform to x64 (if not already selected)
    • Under C/C++ / General / Additional Include Directories, add: c:\gurobi701\win64\include
    • Under Linker / General / Additional Library Directories, add: c:\gurobi701\win64\lib
  6. Under C/C++ / Precompiled Headers / Precompiled Header, select Not Using Precompiled Headers
  7. Under Linker / Input / Additional Dependencies, add gurobi70.lib and gurobi_c++mdd2015.lib
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值