Re: hypot with gsl static library

"Kees Zeelenberg" <[email protected]>
Newsgroups gmane.comp.windows.gnu.user
Message-ID <007901c79555$bf5e8530$34106550@gamma>
You can define hypot to _hypot at the start of your program (in C: #define
hypot _hypot) and then recompile.

In Visual C++ the POSIX names, such as hypot, are automatically converted to
the MSVCRT names with underscore prepended, unless some specific option has
been defined to turn off this conversion. I would guess that with Visual
Basic there is a similar option; apparently it has been turned on when the
program was compiled.

Kees Zeelenberg

----- Original Message ----- 
From: le a
To: [email protected]
Sent: Thursday, May 10, 2007 1:57 AM
Subject: [GnuWin32-Users] hypot with gsl static library


Hi,

Any sugestions for a newbie will be greatly appreciated!

I am trying to statically link libgsl.a with a program made in Basic.
I get the following error:
gsl.lib(matrix_oper.o) : error LNK2001: unresolved external symbol '_hypot'

My link (MS-2.50.4048) command is:
link /entry:WinMain /NODEFAULTLIB /SUBSYSTEM:CONSOLE /INCREMENTAL:NO 
/RELEASE /NOLOGO /OPT:REF /ALIGN:4096 -out:MI.exe MI.obj MI.rbj xst_s.lib 
xsx_s.lib xio_s.lib xma_s.lib msvcrt.lib gsl.lib gslcblas.lib xblib.lib 
kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib

Note, please, that I am linking against msvcrt.lib, which has got a hypot 
symbol defined (in fact is _hypot) and my compiler does not accept /D 
option.

Yes, I read the docs, but before I will attempt to compile the lib again and 
replace hypot with gsl_hypot, is there any other solution to this? Other 
library available? Any linker option? Anything?

Thanks,

Liviu

Send instant messages to your online friends http://au.messenger.yahoo.com



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/



_______________________________________________
GnuWin32-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.