Visual Studio 中的 GSL-GNU
我有 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)
I have visual studio 2008, I want to integrate GSL library in my project, kindly give me some guidelines so that I can make it possible.
I have added the GSL library but the following error come.
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最初的 GNU Scientific 库并不是由
gcc
以外的任何东西构建的,正如您在他们的 支持的平台部分。请在此处查看应使用 Visual Studio 构建的版本。The orignal GNU Scientific library wasn't meant to be built by anything else than
gcc
, as you can see in their Supported Platforms section. Take a look here for a version that should build with Visual Studio.