Using Sparse Bundle Adjustment (SBA) in windows(在windows下编译SBA)

原文连接


These are the steps to compile SBA in windows using Visual Studio
Visual Studio 2008

1. Download the SBA from http://www.ics.forth.gr/~lourakis/sba/
2. Download the precompiled Lapack libraries (you will need BLAS.LIB, CLAPACK.lib, LIBF2C.lib). Download from http://www.netlib.org/clapack/LIB_WINDOWS/prebuilt_libraries_windows.html
2a) download them into a specified folder say xxx\lib. make sure you use either all of hte debug version or all of release version. Any mismatch might lead to link error in VS.
3. Extract the SBA package and you need to create a VS project. You can do it in two ways
2a) Use CMake – download CMAKE from CMake GUI http://www.cmake.org/
Use CMAKE to configure and generate the VS projects. In the configure stage, make sure you specify the path for libraries blas and lapack. F2C should be on.
2b) The second way is that you create a new project.It should be a console project but without any precompiled headers. As the sba files are essentially C files.
3) Check the libraries dependency
In the linker settings. Make sure you have the link directory set to xxx\lib. Add the lib files in the additional link libraries in the order libf2c.lib, blas.lib, lapack.lib
4) If you have created the project on you own, add the source files and header files.
5) Press F7, then F5….

 

** In case you get some link error like conflict with msvcrt, put this setting

LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
1>LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)

in the Linker->input->Ignore specific library -LIBCMT.lib

 

Enjoy


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值