Opened 11 years ago

Closed 11 years ago

#2216 closed defect (fixed)

Problems using MinGW to builds apps against VC++ builds of GDAL

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.5.1
Component: ConfigBuild Version: 1.5.0
Severity: normal Keywords: mingw win32

Description (last modified by warmerdam)

In an attempt to build GRASS with MinGW against a normal VC++ build of GDAL I ran into the following two problems:

1) The redefinitions of copysign, copysignf and copysignl to _copysign in causes syntax errors while including the mingw math.h. The solution is to only redefine them if the compiler in use is MS VC++.

2) Currently CPL_STDCALL is only being redefined to _ _stdcall for VC++ compilers. This means that an MinGW app build against a VC++ built GDAL does not use stdcall where appropriate. The solution is for to always define CPL_STDCALL to _ _stdcall as long as CPL_DISABLE_STDCALL is not defined.

Change History (1)

comment:1 Changed 11 years ago by warmerdam

Description: modified (diff)
Resolution: fixed
Status: newclosed

Patches applied in trunk (r13758) and 1.5 branch (r13759).

Note: See TracTickets for help on using tickets.