[gdal-dev] Gdal driver not working in windows 7

Ram prasad ramprasad85 at gmail.com
Mon Nov 22 15:10:57 EST 2010


Following is repost, because the message appeared garbled in the mailing list.

I could not compile my code along with other formats in frmts due to
my insufficient experience in using nmake projects.

http://www.gdal.org/gdal_drivertut.html gives information on writing a driver.
Is there a document on compiling the driver? I need to be able to
specify the search path for include files for the compiler and input
files for the linker.

Thank you

On Fri, Nov 19, 2010 at 4:13 AM, Tamas Szekeres <szekerest at gmail.com> wrote:
>
> Did you compile GDAL and the plugin with the same CRT setting  (ie. /MD), what kind of subsequent libraries have been compiled in GDAL?
>
> You may probably use http://vbkto.dyndns.org/sdk/release-1500-dev.zip for compiling both GDAL and your plugin to create a consistent build by using the same compiler for each.
>
> Best regards,
>
> Tamas
>
>
>
>
> 2010/11/18 Ram prasad <ramprasad85 at gmail.com>
>>
>> Thank you Frank,
>> I had upgraded the MSVC 2005 sln to 2008 sln without changing the MSVC_VER in the NMAKE properties page. Now the gdal executables and the driver are compiled are by MSVC 2008 (MSVC_VER =1500) in the release mode, but the problem still continues to exist.
>> In fact in the GDALRegister_test function if I add the following lines of code
>> GDALDriver  *poDriver_temp = new GDALDriver();
>> printf("about to delete\n");
>> delete poDriver_temp;
>> printf("delete ok\n");
>> The code crashes at line 3
>> But i am sure that there is something wrong in my code because the drivers in http://vbkto.dyndns.org/sdk/release-1500-gdal-1-7-mapserver-5-6.zip seem to be working correctly
>> Let me briefly explain what i am doing.
>> I 've created an empty win32 console project in dll configuration
>> have created a folder called gdal_1_6_0_files which contains the .h files from gcore and port directories and the gdal_i.lib, gdal16.dll and the exes in apps
>> add the testDataset.cpp and makethe include and linker settings
>> after compilation I set the GDAL_DRIVER_PATH accordingly and run gdal_translate.exe
>> This works in WindowsXP but the same does not work in windows7
>> I don't know what to do?
>> On Fri, Nov 19, 2010 at 12:38 AM, Frank Warmerdam <warmerdam at pobox.com> wrote:
>>>
>>> Ram prasad wrote:
>>>>
>>>> The gdal driver for my format is working perfectly in windows XP but not in windows7. It is crashing when I run gdalinfo gdal_translate.exe with or without parameters. so i wrote a dummy gdal driver (the following code), which also is crashing in GDALDriverManager::~GDALDriverManager()  at the line "delete poDriver;". This also happens in windows server 2008. The gdal versions i tested are 1.6.0, 1.6.1. and 1.7.3
>>>> I am using visual studio 2008 The error message from debugger is /"Unhandled exception at 0x773f61e9 in gdal_translate.exe: 0xC0000005: Access violation reading location 0x7e7fd537."/
>>>>
>>>
>>> Ram,
>>>
>>> Are you building GDAL itself with visual studio 2008 and similar compiler
>>> options as used for your plugin?
>>>
>>> It has been my experience that it is not safe to build plugins with
>>> significantly different compiler version or flags.  Also, I found that
>>> Vista and Win7 are much more sensitive to the problems caused by mixing
>>> versions compared to WinXP.
>>>
>>> Best regards,
>>> --
>>> ---------------------------------------+--------------------------------------
>>> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
>>> light and sound - activate the windows | http://pobox.com/~warmerdam
>>> and watch the world go round - Rush    | Geospatial Programmer for Rent
>>>
>>
>>
>>
>> --
>> "Love all serve all" - ..::Sri Sathya Sai::..
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



--
"Love all serve all" - ..::Sri Sathya Sai::..


More information about the gdal-dev mailing list