cURL / Mailing Lists / curl-library / Single Mail

curl-library

Version info in curl.h (was Re: Companies Using curl)

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 9 Mar 2004 13:04:23 +0100 (CET)

On Tue, 9 Mar 2004, Eduardo García wrote:

>         Having introduced ourself, we have a little issue with libcurl MSVC
> compilation that is be very easy to solve and we think should be solved in
> this future 7.11.1 release:   the library (dll) is rebuilt again by the
> compiler (VisualStudio7(.net), both 2002 or 2003 editions) every time it
> checks if it's up-to-date.

>         This is because of the resource including of curl.h for version
> defines, with makes it includes all standard C and windows headers, and
> makes the compiler think resources are not up-to-date every time it checks
> before compilation of other project in the same workspace ("solution", as it
> is called in VS7) or at the beginning of every debugging sesion.

This puzzles me! I'd appreciate some more details on this weirdness.

Why does it think that? Besides, why is this only an issue in curl.h?
libcurl source files include standard header files all over, why are they not
causing problems too then?

Or are you saying that this is only happening because that file is included
from the src/curl.rc file?

If so, why isn't the inclusion of <winver.h> from that file also a problem?

So, the compiler thinks one of the system headers have been changed so it
rebuilds the resource file and then rebuilds the whole project or what?
Anyway, is this really such a big problem? You don't need to run make in the
curl source directory all the time! ;-)

>         LIBCURL_VERSION, LIBCURL_VERSION_NUM, LIBCURL_VERSION_MAJOR,
> LIBCURL_VERSION_MINOR, and LIBCURL_VERSION_PATCH should be defined in a
> separate header curl_ver.h included both by curl.h and the resources file
> (libcurl.rc), and so resources will not include main headers included by
> curl.h.
>
> We understand this little change will not affect any other OS build.

True, but it would add an extra header file for no apparent reason.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-03-09