cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sys_nerr on MSVC

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 25 Mar 2004 13:06:03 +0100

"Daniel Stenberg" <daniel-curl_at_haxx.se> said:

> It seems the most recent curl_strerror.c patch doesn't build fine on MSVC:

Which says:
  .\curl_strerror.c(491) : warning C4273: '_sys_nerr' : inconsistent dll linkage. dllexport assumed

>From MSVC6's stdlib.h:
   _CRTIMP extern int _sys_nerr; /* # of entries in sys_errlist table */
  #define sys_nerr _sys_nerr
and
  #define _CRTIMP __declspec(dllimport)

Which is the same in MSVC7. I assume Greg uses v7.

I'm so not familar with MSVC, but _sys_nerr should be imported,
not exported. So what's wrong? It's no problem with MSVC6.

Tip to Greg: delete the *.pdb/*.pch files and make clean before rebuilding.
Maybe MS moved sys_nerr to oldnames.lib. Try to link with that
too.

--gv
Received on 2004-03-25