0

我有 Visual Studio 2008,我想在我的项目中集成 GSL 库,请给我一些指导,以便我可以实现它。

我添加了 GSL 库,但出现以下错误。

Error   1   error LNK2028: unresolved token (0A000010) "extern "C" void __cdecl gsl_matrix_set(struct gsl_matrix *,unsigned int,unsigned int,double)" (?gsl_matrix_set@@$$J0YAXPAUgsl_matrix@@IIN@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)

Error   2   error LNK2028: unresolved token (0A000011) "extern "C" struct gsl_matrix * __cdecl gsl_matrix_alloc(unsigned int,unsigned int)" (?gsl_matrix_alloc@@$$J0YAPAUgsl_matrix@@II@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)    

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

Error   4   error LNK2019: unresolved external symbol "extern "C" double __cdecl gsl_matrix_get(struct gsl_matrix const *,unsigned int,unsigned int)" (?gsl_matrix_get@@$$J0YANPBUgsl_matrix@@II@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)    

Error   5   error LNK2019: unresolved external symbol "extern "C" void __cdecl gsl_matrix_set(struct gsl_matrix *,unsigned int,unsigned int,double)" (?gsl_matrix_set@@$$J0YAXPAUgsl_matrix@@IIN@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
4

2 回答 2

4

gcc正如您在他们支持的平台部分中看到的那样,原始的 GNU Scientific 库并不是由其他任何东西构建的。在此处查看应该使用 Visual Studio 构建的版本。

于 2010-01-05T07:58:24.000 回答
1
    在 MS Visual Studio 2010 上使用 Intel C/C++ 的替代 GSL 可在以下位置找到:
    http://xtechnotes.blogspot.com.au/2012/07/gslwintel.html
    https://sites.google.com/site/gslwintel/home

于 2012-12-21T05:36:44.123 回答