1. 程式人生 > >win10下 bundler下載安裝

win10下 bundler下載安裝

前提:windows下配置好VS2013

2、開啟vs2013,開啟bundler-v0.4-source目錄下vc++目錄中的Bundler.sln工程

3、依次編譯bundler所需要的依賴庫  5point、ann_1.1_char、cblas、getopt、imagelib、jpeg、matrix、sba-1.5、sfm-driver、f2c、clapack、cminpack,keyMatchFull、Bundler、Bundlr2PMVS、RadialUndistort,可能遇到的錯誤如下:

  • 編譯5point:

         matrix.h中會出現錯誤 ,error C2054: 在“inline”之後應輸入“(” ,參考部落格,

    解決方法是在標頭檔案新增如下語句:

          #if defined(WIN32) && !defined(__cplusplus)

          #define inline __inline

          #endif

  • 編譯imagelib

error C2491: “erf”: 不允許 dllimport 函式 的定義,修改如下:

             進入filter.c遮蔽該函式

  • 編譯f2c

           會給出無法找到#include"sysdep1.h"檔案的錯誤,修改如下:

            進入f2c目錄,將sysdep1.h0檔名修改為sysdep1.h、將signal1.h0檔名修改為signal1.h、

          再次編譯f2c庫時,會提示無法找到#include"arith.h"檔案的錯誤,同時在f2c目錄下並沒有名字為arith.h的檔案

                         新建一個arith.h檔案,內容如下:

                     #define IEEE_8087

                     #define Arith_Kind_ASL 1

                     #define Long int

                     #define Intcast (int)(long)

                     #define Double_Align

                     #define X64_bit_pointers

                     #define QNaN0 0x0

                     #define QNaN1 0xfff80000

  • 編譯keyMatchFull、Bundler

​​​​​​​             

            error C2491: “erf”: 不允許 dllimport 函式的定義

                解決辦法是將函式註釋掉,不需要這個函式。

               還會報錯一個LNK問題。

               解決辦法是將imagelib那個專案編譯一遍,會自動在LNK檔案處新增依賴庫,讓問題得以解決

  • 編譯Bundlr2PMVS

​​​​​​​         error C3861: “mkdir”:  找不到識別符號

           在檔案的開頭新增#include<direct.h>,

           同時將mkdir替換為_mkdir,如下所示:

           //mkdir(output_path,0770);

            _mkdir(output_path);

  • 編譯RadialUndistort

​​​​​​​         出現“無法識別的識別符號index”。

 //char *space = index(buf, ' ');

 //if (space) *space = 0;

  將其替換為:

 std::string str(buf);

  intspace_pos = str.find(' ');

 str.at(space_pos) = 0;

  files.push_back(str);

 error C1083: 無法開啟包括檔案: “jpeglib.h”: No such file or directory

     在RadialUndistort的屬性頁的c/c++  ->常規 -> 附加包含目錄-> 增加專案lib包下的jpeg/src路徑。(..\lib\jpeg\src)

     屬性---c/c++----常規-----附加包含目錄新增..\lib\jpeg\src;..\lib\imagelib;..\include; ..\lib\matrix; ..\lib\sfm-driver

    連結庫----常規----------附加庫目錄增加檔案路徑\bundler-v0.4-source\vc++\Debug