Question

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)
Was it helpful?

Solution

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.

OTHER TIPS

    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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top