Changes between Version 3 and Version 4 of FAQInstallationAndBuilding


Ignore:
Timestamp:
Nov 18, 2007, 8:56:10 AM (16 years ago)
Author:
Mateusz Łoskot
Comment:

Added FAQ about VC++ and libcurl issue with Winsock2 header bug

Legend:

Unmodified
Added
Removed
Modified
  • FAQInstallationAndBuilding

    v3 v4  
    141141
    142142These are not supported compilers for GDAL; however, GDAL is mostly pretty generic, so if you are willing to take on the onerous task of building an appropriate makefile / project file it should be possible. You will find most portability issues in the [http://www.gdal.org/cpl__port_8h.html gdal/port/cpl_port.h] file and you will need to prepare a [http://www.gdal.org/cpl__config_8h-source.html gdal/port/cpl_config.h] file appropriate to your platform. Using [http://trac.osgeo.org/gdal/browser/trunk/gdal/port/cpl_config.h.vc cpl_config.h.vc] as a guide may be useful.
     143
     144== Why Visual C++ 8.0 fails with C2894 error in wspiapi.h when building GDAL with libcurl support? ==
     145
     146Here is the complete error message of this issue:
     147{{{
     148C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wspiapi.h(44) :
     149   error C2894: templates cannot be declared to have 'C' linkage
     150}}}
     151
     152This is a [http://curl.haxx.se/mail/tracker-2007-11/0027.html known bug] in the wspiapi.h header. One of possible solutions is to manually patch ''curl.h'' replacing lines '''153 - 154''' with the following code:
     153
     154{{{
     155#ifdef __cplusplus
     156}
     157#endif
     158#include <winsock2.h>
     159#include <ws2tcpip.h>
     160#ifdef __cplusplus
     161extern "C" {
     162#endif
     163}}}
     164
     165This problem occurs in [http://curl.haxx.se/libcurl/ libcurl] <= 7.17.1. Perhaps, later versions of libcurl will include this fix.