Serving the Quantitative Finance Community

 
User avatar
maxim
Topic Author
Posts: 2
Joined: April 27th, 2002, 7:57 pm

Compiling GNU Scientific Library with VC6

May 23rd, 2002, 7:46 pm

Dear all,Has anybody got experience with compiling gnu library with VisualC 6?I declare headers exactly as it is prescribed in help but always get the following error:Linking...GNU.obj : error LNK2001: unresolved external symbol _gsl_sf_bessel_J0Debug/GNU.exe : fatal error LNK1120: 1 unresolved externalsError executing link.exe.Thanks in advance.
 
User avatar
Ab
Posts: 1
Joined: March 27th, 2002, 11:15 am

Compiling GNU Scientific Library with VC6

May 24th, 2002, 7:33 am

Try adding "extern" at the begining of the line of code declaring your function (..bessel...) in the source file.Hope this is of any help,Ab
 
User avatar
softduck
Posts: 0
Joined: May 21st, 2002, 2:28 am

Compiling GNU Scientific Library with VC6

May 24th, 2002, 11:57 am

Maxim,To properly answer your question, a few more details are needed:1) Where is _gsl_sf_bessel_J0 defined (looks like GNU.obj is referencing this symbol that's defined somewhere in your code).2) Is your GNU library an actual port of GNU freeware ported for windows....or is it some proprietary library that happens to be called GNU? I'm just curious....because GNU source is typically for UNIX-based OS's (even though GNU stands for GNU's Not Unix).3) The extern suggestion that Ab mentioned should only work if GNU.obj is compiled with a C compiler...and is referencing _gsl_sf_bessel_J0 which happens to be compiled with a C++ compiler. Extern will simply eliminate the C++ name-mangling and make it visible to GNU.obj...Sean.
 
User avatar
maxim
Topic Author
Posts: 2
Joined: April 27th, 2002, 7:57 pm

Compiling GNU Scientific Library with VC6

May 24th, 2002, 3:06 pm

Thank you allThere was indeed a problem with "externals".I have fixed it.