[Gdal-dev] Compiling under .NET

Matthew Hanson mhanson at photon.com
Fri Aug 13 13:28:44 EDT 2004


Here's some more complete info about this problem, though still unsolved:
****************************

I am trying to build OSSIM under C++ .NET.   When it gets to the GDAL part
of the build it issues the commands in the makefile as follows and the
generates the error message:

************************************
cd port
 nmake /nologo /f makefile.vc
 cl /nologo /Ox /MD -I..\port -I..\ogr -I..\gcore  /c cpl_conv.cpp
cpl_conv.cpp
cpl_conv.cpp(904) : error C3861: 'snprintf': identifier not found, even with
argument-dependent lookup
************************************

Now, in the cpl_config.h.vc file under the port dir in the GDAL distribution
you can comment out these lines as follows:

/* Define if you have the vprintf function.  */
/* 
#define HAVE_VPRINTF
#define HAVE_VSNPRINTF
#define HAVE_SNPRINTF
#define vsnprintf _vsnprintf
#define snprintf _snprintf
*/

BUT, then the Makefile complains a little further along with:

Cpl_odbc.cpp(841) : error C3861: 'vnsprintf': identifier not found, even
with argument-dependent lookup

Which doesn't seem to make sense, because I commented out that line as well
above.  But I don't understand why I wouldn't have the snprintf family of
functions anyway as they should be part of the C stdio standard library.  If
they aren't included under Windows then I would expect lots of people to
have this problem, but it doesn't seem that most people do.  Anyone else run
into this?

matt




More information about the Gdal-dev mailing list