Thanks Even, I commented the DllMain() implementation and now my project compiles again. I would love to send a patch but I'm not a C++ developer and don't know how to fix this.
I will now look into the ECW error. Thanks, Paul *Paul Meems * Release manager, configuration manager and forum moderator of MapWindow GIS. www.mapwindow.org Owner of MapWindow.nl - Support for Dutch speaking users. www.mapwindow.nl * * 2013/10/14 Even Rouault <even.roua...@mines-paris.org> > Le lundi 14 octobre 2013 18:33:05, Paul Meems a écrit : > > Hi all, > > > > We're using GDAL in our Open Source GIS application called MapWinGIS ( > > https://mapwingis.codeplex.com). > > MapWinGIS is build using Visual Studio 2008 Pro and its language is VC++. > > We've been using GDAL for years now. > > I'm currently in the process of update the external libraries, like GDAL, > > GEOS, etc. > > > > I have compiled the trunk version of GDAL (v1.10.1), with the trunk > version > > of Proj4, GEOS v3.4.2, ERDAS SDK v5 and the latest LizardTech SDK. > > This process seems to be working OK, like it has been for the last > several > > years. > > When I test with gdalinfo.exe I can open tiff-files, ECW-files and > > MrSid-files. > > > > But when I want to include the gdal.lib into MapWinGIS I get two strange > > errors which I don't get if I use GDAL v1.9. > > > > #1: error LNK2005: _DllMain@12 already defined in > > mfcs90.lib(dllmodul.obj) gdal.lib > > #2: fatal error LNK1194: cannot delay-load 'NCSEcw.dll' due to import of > > data symbol '"__declspec(dllimport) const NCS::CMutex::`vftable'" > > (__imp_??_7CMutex@NCS@@6B@)'; link without /DELAYLOAD:NCSEcw.dll > > > > The second error is about the ERDAS SDK and can be solved by removing > > 'NCSEcw.dll' from the delay load binaries. But I'm not sure if we can > still > > show ecw-files. > > > > #1 seems to be the biggest problem and we've tried several different > > configurations and searched a lot using Google but we can solve this. > > > > Does anybody understands what is going on and how we can fix this so we > can > > use the latest GDAL library? > > It seems that you are statically linking to GDAL ? Then try commenting the > DllMain() implementation in gcore/gdaldllmain.cpp. If this is the root of > the > problem, it probably means that we shouldn't link that file in the static > lib. > Patches welcome ! > > > > > > > Thanks, > > > > Paul > > > > *Paul Meems * > > Release manager, configuration manager > > and forum moderator of MapWindow GIS. > > www.mapwindow.org > > > > Owner of MapWindow.nl - Support for > > Dutch speaking users. > > www.mapwindow.nl > > > > * > > * > > -- > Geospatial professional services > http://even.rouault.free.fr/services.html >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev