views:

484

answers:

2

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)

+1  A: 

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.

Joey
A: 

Thank you. My question is similar:

Has anyone found differences in using the following GSL versions for Visual Studio

Brian Gladman's

gladman.plushost.co.uk/oldsite/computing/gnu_scientific_library.php

vs. David Geldreich's

http://david.geldreich.free.fr/dev.html

Your comments on either versions would be helpful. Or if you purport a different version for MSVS 2008, please post. Thank you!!

BC