This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
RE: gsl/visual C++
- To: <gsl-discuss at sources dot redhat dot com>
- Subject: RE: gsl/visual C++
- From: "Jiri Hajek" <jirik at ucw dot cz>
- Date: Fri, 22 Jun 2001 10:37:47 +0100
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
>