2010-01-05 56 views
0

我有Visual Studio 2008,我想將GSL庫集成到我的項目中,請給我一些指導,以便我可以做到這一點。在Visual Studio中的GSL-GNU

我已經添加了GSL庫,但出現以下錯誤。

Error 1 error LNK2028: unresolved token (0A000010) "extern "C" void __cdecl gsl_matrix_set(struct gsl_matrix *,unsigned int,unsigned int,double)" ([email protected]@[email protected]@[email protected]) referenced in function "int __cdecl main(void)" ([email protected]@$$HYAHXZ) 

Error 2 error LNK2028: unresolved token (0A000011) "extern "C" struct gsl_matrix * __cdecl gsl_matrix_alloc(unsigned int,unsigned int)" ([email protected]@[email protected]@[email protected]) referenced in function "int __cdecl main(void)" ([email protected]@$$HYAHXZ)  

Error 3 error LNK2028: unresolved token (0A000014) "extern "C" double __cdecl gsl_matrix_get(struct gsl_matrix const *,unsigned int,unsigned int)" ([email protected]@[email protected]@[email protected]) referenced in function "int __cdecl main(void)" ([email protected]@$$HYAHXZ) 

Error 4 error LNK2019: unresolved external symbol "extern "C" double __cdecl gsl_matrix_get(struct gsl_matrix const *,unsigned int,unsigned int)" ([email protected]@[email protected]@[email protected]) referenced in function "int __cdecl main(void)" ([email protected]@$$HYAHXZ)  

Error 5 error LNK2019: unresolved external symbol "extern "C" void __cdecl gsl_matrix_set(struct gsl_matrix *,unsigned int,unsigned int,double)" ([email protected]@[email protected]@[email protected]) referenced in function "int __cdecl main(void)" ([email protected]@$$HYAHXZ) 

回答

4

的一部開拓創新的GNU科學圖書館是不是意味着要通過別的比gcc建成,因爲你可以在自己的Supported Platforms部分看到。對於應該使用Visual Studio構建的版本,請看here

1
 

    An alternative GSL with Intel C/C++ on MS Visual Studio 2010 can be found at: 
    http://xtechnotes.blogspot.com.au/2012/07/gslwintel.html 
    https://sites.google.com/site/gslwintel/home