Opened 17 years ago

Last modified 17 years ago

#1461 closed defect (fixed)

Error in MS Visual C++ 2005 Express Build Instructions

Reported by: steve2@… Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

The gdal.org FAQ build instructions for MS Visual C++ 2005 Express has an error that prevents GDAL from building.  The "Patch atlbase.h header" section is based on this gdal-dev post:
http://lists.maptools.org/pipermail/gdal-dev/2005-December/007537.html

referencing this solution:
http://tech.groups.yahoo.com/group/wtl/message/12850

The FAQ is missing the # before all the define statements, and the new macros are missing the re-defined functions.  The below code (from the Yahoo Groups post) is correct and has been tested on a clean install of MS Visual C++ 2005 Express with the latest code from SVN.  The current code in the FAQ does not work and results in a compile error.

/* ***************************************************
PVOID __stdcall __AllocStdCallThunk(VOID);
VOID  __stdcall __FreeStdCallThunk(PVOID);

#define AllocStdCallThunk() __AllocStdCallThunk()
#define FreeStdCallThunk(p) __FreeStdCallThunk(p)

#pragma comment(lib, "atlthunk.lib")
**************************************************** */

/* NEW MACROS */
#define AllocStdCallThunk() HeapAlloc(GetProcessHeap(),0,sizeof(_stdcallthunk))
#define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p)

Change History (1)

comment:1 by warmerdam, 17 years ago

Steve,

I have moved some of the contents of doc/faq.dox into a \verbatim environment
instead of using the html <pre> which seems to still let doxygen do some
dangerous pre-processing of the contents.  The problem seems to be resolved
now. 

Thanks!
Note: See TracTickets for help on using tickets.