public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: gsl/visual C++
  2001-12-19 13:20 gsl/visual C++ KAINTH, Dherminder, Group Risk
  2001-12-19 13:20 ` Jiri Hajek
@ 2001-12-19 13:20 ` Brian Gough
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Gough @ 2001-12-19 13:20 UTC (permalink / raw)
  To: KAINTH, Dherminder, Group Risk; +Cc: 'gsl-discuss@sources.redhat.com'

The library is compiled with the /MD option, for multithreading
support, and is statically linked.  There is a section in the
Microsoft help file about /MD and related options.  The test programs
are also compiled with /MD. 

It sounds like the /MD option may not be optimal... I'll have to take
another look at that before the next release.

regards
Brian Gough

^ permalink raw reply	[flat|nested] 4+ messages in thread

* gsl/visual C++
@ 2001-12-19 13:20 KAINTH, Dherminder, Group Risk
  2001-12-19 13:20 ` Jiri Hajek
  2001-12-19 13:20 ` Brian Gough
  0 siblings, 2 replies; 4+ messages in thread
From: KAINTH, Dherminder, Group Risk @ 2001-12-19 13:20 UTC (permalink / raw)
  To: 'gsl-discuss@sources.redhat.com'

Hi,


I have downloaded the Visual C++ version of the GSL(Version 0.8). The
workspaces compile and I have generated the libgsl and libgslcblas files.
The tests also run fine. 

However when I set up a new project (including the appropriate libraries -
libgsl/libgslcblas) with access to the appropriate header files - in
particular the config.h file in the  msvc directory I get linker errors - in
particular I have:
"
Linking...
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in
LIBC.lib(free.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in
LIBC.lib(malloc.obj)
MSVCRT.lib(MSVCRT.dll) : error LNK2005: _abort already defined in
LIBC.lib(abort.obj)
LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other
libs; use /NODEFAULTLIB:library
Release/gsl_1DRootFind.exe : fatal error LNK1169: one or more multiply
defined symbols found
Error executing link.exe.

gsl_1DRootFind.exe - 4 error(s), 1 warning(s)

"
This was generated when I attempted to use the example code in the
postscript documentation for the solution of a quadratic equation in chapter
30.

I imagine that this is due to the project settings/extern "C"(?)
declarations... however the differences in the files is not obvious. Can
anyone shed some light on this please ?

Dr Dherminder Kainth

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: gsl/visual C++
  2001-12-19 13:20 gsl/visual C++ KAINTH, Dherminder, Group Risk
@ 2001-12-19 13:20 ` Jiri Hajek
  2001-12-19 13:20 ` Brian Gough
  1 sibling, 0 replies; 4+ messages in thread
From: Jiri Hajek @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Hi,

I've had the same problem and if I remember it well, it is a problem of
different settings of MSVCRT in the library and in your project
(single/multithreaded, ...). When you press F1 on the line with the warning,
you get help that should guide you.

Jiri

P.S.: The way to the setting is:
 - Project settings
 - C/C++
 - Code generation
 - Use run-time library

> -----Original Message-----
> From: gsl-discuss-owner@sources.redhat.com
> [ mailto:gsl-discuss-owner@sources.redhat.com]On Behalf Of KAINTH,
> Dherminder, Group Risk
> Sent: Friday, June 22, 2001 9:20 AM
> To: 'gsl-discuss@sources.redhat.com'
> Subject: gsl/visual C++
>
>
> Hi,
>
>
> I have downloaded the Visual C++ version of the GSL(Version 0.8). The
> workspaces compile and I have generated the libgsl and libgslcblas files.
> The tests also run fine.
>
> However when I set up a new project (including the appropriate libraries -
> libgsl/libgslcblas) with access to the appropriate header files - in
> particular the config.h file in the  msvc directory I get linker
> errors - in
> particular I have:
> "
> Linking...
> MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in
> LIBC.lib(free.obj)
> MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in
> LIBC.lib(malloc.obj)
> MSVCRT.lib(MSVCRT.dll) : error LNK2005: _abort already defined in
> LIBC.lib(abort.obj)
> LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other
> libs; use /NODEFAULTLIB:library
> Release/gsl_1DRootFind.exe : fatal error LNK1169: one or more multiply
> defined symbols found
> Error executing link.exe.
>
> gsl_1DRootFind.exe - 4 error(s), 1 warning(s)
>
> "
> This was generated when I attempted to use the example code in the
> postscript documentation for the solution of a quadratic equation
> in chapter
> 30.
>
> I imagine that this is due to the project settings/extern "C"(?)
> declarations... however the differences in the files is not obvious. Can
> anyone shed some light on this please ?
>
> Dr Dherminder Kainth
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gsl/visual C++
@ 2001-12-19 13:20 Dherminder Kainth
  0 siblings, 0 replies; 4+ messages in thread
From: Dherminder Kainth @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Dear Brian,

I may have mailed you (I am not sure whether my browser sent the message). 
Thank you for your prompt reply; certainly what you suggest works for the 
problem at hand - so thank you very much.

Yours,

Dherminder Kainth





>From: Brian Gough <bjg@network-theory.co.uk>
>Reply-To: gsl-discuss@sources.redhat.com
>To: "KAINTH, Dherminder, Group Risk" <Dherminder.Kainth@rbos.com>
>CC: "'gsl-discuss@sources.redhat.com'" <gsl-discuss@sources.redhat.com>
>Subject: Re: gsl/visual C++
>Date: Fri, 22 Jun 2001 11:49:10 +0100 (BST)
>
>The library is compiled with the /MD option, for multithreading
>support, and is statically linked.  There is a section in the
>Microsoft help file about /MD and related options.  The test programs
>are also compiled with /MD.
>
>It sounds like the /MD option may not be optimal... I'll have to take
>another look at that before the next release.
>
>regards
>Brian Gough
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com .

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-19 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 gsl/visual C++ KAINTH, Dherminder, Group Risk
2001-12-19 13:20 ` Jiri Hajek
2001-12-19 13:20 ` Brian Gough
  -- strict thread matches above, loose matches on Subject: below --
2001-12-19 13:20 Dherminder Kainth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).