[Gdal-dev] 1: HELP: GDAL for windows CE

Vasku Pech vaskup at adsmr.co.za
Mon May 8 06:09:27 EDT 2006


Hello Mateus,

Hope you had a good short holiday.

Have you had time to look at my email below? I could not get the STL, you mention in the Readme, to compile for the Emulator. Is that why I cant get the ogr source files to compile for the Emulator?

Regards,
Vasku

-----Original Message-----
From: Vasku Pech 
Sent: 04 May 2006 05:29 PM
To: 'Mateusz Loskot'
Cc: gdal-dev at lists.maptools.org
Subject: RE: HELP: GDAL for windows CE


Hi there Mateus,

Finally I got the source files to compile.

I changed 
port/cpl_config.h.evc4
to read:
port/cpl_config.h

This still did not solve the problem. I had to add ex to your #define in  cpl_config.h

So for example:
#define strerror wce_strerror /* defined in cpl_wince.h */

was changed to read

#define strerror wceex_strerror /* defined in cpl_wince.h */ (extra ex in wce_strerror)

I had to do this through out the cpl_config.h file. Where ever I found wce I added ex to it.

After these changes I managed to get the source to compile but there were 51 warnings all to do with the same file cpl_string.h: The warning is -

c:\gdal-131a_wince\gdal-cvs-2006.04.26\port\cpl_string.h(211) : warning C4275: non dll-interface class 'std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' used as base for dll-interface class 'CPLString'

Is it ok if I use the DLL as is?

I managed to compile the source for the device but could not get it to compile for the emulator. I need to get it to work as I will be testing my code first using the emulator.

When I try to comiple for the emulator I get the following error 14 times relating to different files:

C:\Gdal-131a_wince\gdal-cvs-2006.04.26\port\cpl_conv.cpp(1495) : error C2373: 'CPLFreeConfig' : redefinition; different type modifiers
        C:\Gdal-131a_wince\gdal-cvs-2006.04.26\port\cpl_conv.h(157) : see declaration of 'CPLFreeConfig'

I find it strange. The header file has a different function declaration for CPLFreeConfig than what is used in the .ccp file.

Why can I not compile for the emulator?

Regards,
Vasku

PS: In your last email you stated

Mateus wrote:
Hmm, I don't have this file there in the ogr subdir.
cpl_config.h should be renamed as I'm explaining above

Look in the following directory ogr\ogrsf_frmts\dgn\dist. You should find another copy of cpl_config.h




-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net]
Sent: 03 May 2006 07:07 PM
To: Vasku Pech
Cc: gdal-dev at lists.maptools.org
Subject: Re: HELP: GDAL for windows CE


Vasku Pech wrote:
> Hi there,
> 
> OK, I finally managed to get the source from CVS. It was not a 
> password problem. My company did not have the CVS port set up 
> correctly so it was not possoble to download the code.

I am glad it works now.

> I thought all my problems would be solved once I got a proper stable 
> version of Gdal for wince. Unfortunately I am still sitting at square
> one.

Yes, it's possible. Let's start to solve those problems :-)

> First, you need to install following software on your machine:
> 
> 0. Compilation box running Windows NT/2000/XP
> 

I assume you've fulfilled those software requirements.


> Initially EVC++ 4.0 had a problem even recognising the files. The 
> CR/LF were missing.

Yes, it's possible.

> I opened the files in WordPad and save over the original file which 
> seems to have solved the problem.

Yes, it should fix the problem. But I'd prefer to use notepad, instead
wordpad.

> I am able to see the Fileview and Classview of the project file. The
>  problem is when I try building the project I initially get the 
> following error 95 or so times:
> 
> Cannot open include file: 'cpl_config.h': No such file or directory

Ups! It seems you've found it's missing in the README.
I've forgot to explain this step.

if you're using eVC++ project files, you have to rename file:

port/cpl_config.h.evc4

to read:

port/cpl_config.h

> I find this file in the OGR directory not the PORT directory where 
> the compiler tries to look for it. I have copied the file and also 
> updated the include path under Projects / Settings/ C/C++ tab 
> (Additional inculde directories).

Hmm, I don't have this file there in the ogr subdir.
cpl_config.h should be renamed as I'm explaining above

> Still this does not work. It comes up with following error 113 times:
>  eMbedded Visual C++ 3 and .NET don't have a errno.h header; STLport 
> won't include native errno.h here


That's the problem. I mean, you need to have cpl_config.h renamed as
said above.
You can look into the port/cpl_config.h.evc4 file and you will see
dedicated #if's for errno.

> Can someone help me out here. I am getting desperate as I dont know 
> what else to do.....

Please, follow my guidelines above related to cpl_config.h and it should
work. Simply, I've forgot to add appropriate instructions to the
wince/README file.

I'll fix it soon when I'm back home after Friday (I'm on small holidays).

> I have also tried compiling the file using the
> make file (makefile.evc4) supplied in the main directory. This is 
> apparently suppose to give me 4 files.


> 
> If everything went without any errors you should have following files
>  in gdal root directory (C:\gdal): gdalce.lib - static library 
> (PREFERED) gdalce13.dll - Dynamic-Link Library (DLL) (See IMPORTANT 
> note) gdalce_i.exp - export file for DLL gdalce_i.lib - import 
> library for DLL
> 
> I cannot even get this to work... HELP, HELP.... Please if anybody
> can point me in the right direction I would be very gratefull.

What's the problem here?
What is the error message?


Please, first try to build using eVC++ project files with my
instructions how to get cpl_config.h files.

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net




More information about the Gdal-dev mailing list