[gdal-dev] failed to add GDal header files to an atl project

梁天辰 2284168009 at qq.com
Wed Jun 5 18:31:41 PDT 2013


Hi all,
I'm using ATL wizards in Visual Studio 2010 to generate an  in-process COM server.Before adding a simple atl object to the project, I added following code to stdafx.h:
#pragma comment(lib,"gdal_i.lib")
#pragma warning( disable: 4251 )
#include "gdal/gdal_priv.h"
#include "gdal/ogr_api.h"
#include "gdal/gdal_alg.h"
#include "gdal/ogrsf_frmts.h"
 but if I include file "gdal/ogrsf_frmts.h" and build the solution, there will be an error message like this:
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(735,5): warning MSB3073: “regsvr32 /s /n /i:user "xxx.dll"” has exit  -1073741819
>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(744,5): error MSB8011: unable to register output 。
I've tried 
STDAPI DllRegisterServer(void)
{
 //SetPerUserRegistration(true);  
 ATL::AtlSetPerUserRegistration(true);  
 HRESULT hr = _AtlModule.DllRegisterServer();
  return hr;
}
. and putting gdal19.dll geos_c.dll the same folder of the project ,and the error still exists.
Is there anything I could do to solve the problem?
Best regards,
liang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130606/6fe04b0f/attachment.html>


More information about the gdal-dev mailing list