MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
Hi there, We've had a lot of requests for the ability to compile MapWinGIS in VS2005 or VS2008. As part of doing so (for library compatibility sake) we need to build GDAL in 2005/2008 as well. Paul and I are running into a roadblock when trying to build the ECW plug-in
ECW (ERMapper) with VS2005 or VS2008?
Posted by:
cmichaelis ()
Date: October 07, 2008 10:06PM
Hi there,
We've had a lot of requests for the ability to compile MapWinGIS in VS2005 or VS2008. As part of doing so (for library compatibility sake) we need to build GDAL in 2005/2008 as well.
Paul and I are running into a roadblock when trying to build the ECW plug-in for GDAL; the ERMapper ECW SDK doesn't seem to be compatible with vs2005 or 2008 for some reason, throwing errors like:
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(49) : er
ror C2059: syntax error : '<L_TYPE_raw>'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(49) : er
ror C2238: unexpected token(s) preceding ';'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(51) : er
ror C2059: syntax error : '<L_TYPE_raw>'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(51) : er
ror C2238: unexpected token(s) preceding ';'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(53) : er
ror C2059: syntax error : '<L_TYPE_raw>'
..etc..
I have seen a few suggestions out on the net for dealing with this, but none have worked. So, my question for everyone out there is: Has anyone been able to compile GDAL with ECW support (or any project that uses ECW SDK) using VS2005 or VS2008?
If so, did you encounter the above problem, and how did you fix it?
Thanks!
--Chris
We've had a lot of requests for the ability to compile MapWinGIS in VS2005 or VS2008. As part of doing so (for library compatibility sake) we need to build GDAL in 2005/2008 as well.
Paul and I are running into a roadblock when trying to build the ECW plug-in for GDAL; the ERMapper ECW SDK doesn't seem to be compatible with vs2005 or 2008 for some reason, throwing errors like:
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(49) : er
ror C2059: syntax error : '<L_TYPE_raw>'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(49) : er
ror C2238: unexpected token(s) preceding ';'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(51) : er
ror C2059: syntax error : '<L_TYPE_raw>'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(51) : er
ror C2238: unexpected token(s) preceding ';'
c:\dev\supportlibraries\gdal\libecwj2-3.3\source\include\NCSJPCBuffer.h(53) : er
ror C2059: syntax error : '<L_TYPE_raw>'
..etc..
I have seen a few suggestions out on the net for dealing with this, but none have worked. So, my question for everyone out there is: Has anyone been able to compile GDAL with ECW support (or any project that uses ECW SDK) using VS2005 or VS2008?
If so, did you encounter the above problem, and how did you fix it?
Thanks!
--Chris
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
Army90 ()
Date: October 08, 2008 01:10PM
hmmmmm......
I've compilied GDAL under VS2005 but don't recall the ERMapper ECW SDK.... Which makes me think I didn't compile it with that support.
The error messages you're getting look familiar. The last time I got those type of messages was a problem with CR/LF versus LF line endings. But VS2005 usually catches that......hmmmmm..... I'll see if I can try and duplicate the problem myself and help out....
I'll be back....
I've compilied GDAL under VS2005 but don't recall the ERMapper ECW SDK.... Which makes me think I didn't compile it with that support.
The error messages you're getting look familiar. The last time I got those type of messages was a problem with CR/LF versus LF line endings. But VS2005 usually catches that......hmmmmm..... I'll see if I can try and duplicate the problem myself and help out....
I'll be back....
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
pmeems ()
Date: October 09, 2008 02:08AM
I've created a topic on the ECW forum about this:
[forums.ermapper.com]
And I might found some possible fixes. I'm not familiar with C++ compiling so I won't try it myself, but perhaps Chris or Army90 can.
Hope it helps.
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
[forums.ermapper.com]
And I might found some possible fixes. I'm not familiar with C++ compiling so I won't try it myself, but perhaps Chris or Army90 can.
From [forums.ermapper.com]Quote
I was able to eliminate my linker warnings by using the /Z7 flag and it all seems to be working now
From [forums.ermapper.com]Quote
Configuration Properties -> C/C++ -> Language -> Treat wchar_t as Built-in Type to No (Zc:wchar_t-)
From [forums.ermapper.com]Quote
Turns out there was a sequence of problems:
1. MS Platform SDK put its include and lib folders above the VS C++ ones which had incompatible libs and includes in them. I moved the VS C++ folders so they where prioritised.
2. I had to manually change the pointers to the ER SDK includes and libs as they did not seem to be resolving correctly.
3. I had to add the following dependences to the NCScnet2 Project settings:
msvcrtd.lib
user32.lib
shell32.lib
advapi32.lib
Hope it helps.
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
geofran80 ()
Date: October 09, 2008 02:31AM
Dear friends, I had a related problem with load ECW and MrSID images and i get the solution adding the related with ECW and MrSID dlls of the Mapwingis Project into the Visual Studio Project.
If you only load the images and not load the dlls will not get the images loaded in the project.
I hope that it serves you.
Francisco J.
If you only load the images and not load the dlls will not get the images loaded in the project.
I hope that it serves you.
Francisco J.
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
Army90 ()
Date: October 09, 2008 08:24AM
Hmmmmm.....
Sorry for the delay.... But I was able to compile the ECW SDK with VS 2005.
I downloaded the ImageCompressionSDKSourceCode3.3Setup_20070509.zip sourc distribution file from
[www.ermapper.com]
From there I searched for a solution file and found
NCSEcw8.sln in
..\libecwj2-3.3\Source\C\NCSEcw\NCSEcw
This was the only VS2005 solution file in the source tree.... It appears to have everything... I attempted to Build the entire solution and only received errors related to not having "winhttp.h" on my system (even though I have VS 2005...hmmm...). I looked and didn't find it and found out it is included in the Platform SDK. I proceeded to download the SDK and installed it on my machine (excluded a bunch of things I knew I would never need...famous last words). I then added the ../include and /Lib directories in the SDK's installation location to all Visual C++ projects via the Tools/Options/Projects and Solutions/VC++ Directories menus and options.
I then attempted to rebuild and it built successfully in Debug mode and then I tried Release mode and it built successfully too....
I haven't tried it with GDAL yet but I think this was worthy of sharing before I got side tracked on something else....
Hope this helps....
Sorry for the delay.... But I was able to compile the ECW SDK with VS 2005.
I downloaded the ImageCompressionSDKSourceCode3.3Setup_20070509.zip sourc distribution file from
[www.ermapper.com]
From there I searched for a solution file and found
NCSEcw8.sln in
..\libecwj2-3.3\Source\C\NCSEcw\NCSEcw
This was the only VS2005 solution file in the source tree.... It appears to have everything... I attempted to Build the entire solution and only received errors related to not having "winhttp.h" on my system (even though I have VS 2005...hmmm...). I looked and didn't find it and found out it is included in the Platform SDK. I proceeded to download the SDK and installed it on my machine (excluded a bunch of things I knew I would never need...famous last words). I then added the ../include and /Lib directories in the SDK's installation location to all Visual C++ projects via the Tools/Options/Projects and Solutions/VC++ Directories menus and options.
I then attempted to rebuild and it built successfully in Debug mode and then I tried Release mode and it built successfully too....
I haven't tried it with GDAL yet but I think this was worthy of sharing before I got side tracked on something else....
Hope this helps....
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
cmichaelis ()
Date: October 09, 2008 08:42AM
Thanks for pointing out ImageCompressionSDKSourceCode3.3Setup_20070509.zip - that zip seems to work for me. The one I had was a little older (but same version number) and didn't have a 2008 project file and doesn't have the fixes that seem to be in the new one.
Thanks,
--Chris
Thanks,
--Chris
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
pmeems ()
Date: November 17, 2008 11:54PM
What is the current status on this one?
Can the ActiveX now be compiled using VS2008?
Are the mentioned files added to the SVN already?
Thanks,
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Can the ActiveX now be compiled using VS2008?
Are the mentioned files added to the SVN already?
Thanks,
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
Army90 ()
Date: January 30, 2009 09:37AM
Whew!!!
OK.... I got back on this yesterday and I skimmed through the repository and didn't see a VS2005 solution for MapWinGIS.... So I decided to give it a whirl.... I now have MapWinGIS compiled with VS2005 correctly with gdal15 with ECW support (I think). I say I think because once I got it compiled and then correctly registered (MapWinGIS.ocx that is), I ran MapWindow and was able to add a MrSID image and a JPEG2000 image. I didn't have a ECW file to test. I also confirmed (via regedit) that all the MapWinGIS classes are mapped to the OCX that I compiled.
Is there a test suite that MapWinGIS is run through prior to release?
Additionally.... I'm scratching my head on a way to streamline the build process as I didn't change Frank Warmerdam's *DIR locations when building gdal15 and I manually moved the various required DLLs into the C:\temp\release directory that MapWinGIS.ocx is written to.
So basically looking for some guidance on how you'd like to move forward (assuming you haven't already done this). Let me know.
OK.... I got back on this yesterday and I skimmed through the repository and didn't see a VS2005 solution for MapWinGIS.... So I decided to give it a whirl.... I now have MapWinGIS compiled with VS2005 correctly with gdal15 with ECW support (I think). I say I think because once I got it compiled and then correctly registered (MapWinGIS.ocx that is), I ran MapWindow and was able to add a MrSID image and a JPEG2000 image. I didn't have a ECW file to test. I also confirmed (via regedit) that all the MapWinGIS classes are mapped to the OCX that I compiled.
Is there a test suite that MapWinGIS is run through prior to release?
Additionally.... I'm scratching my head on a way to streamline the build process as I didn't change Frank Warmerdam's *DIR locations when building gdal15 and I manually moved the various required DLLs into the C:\temp\release directory that MapWinGIS.ocx is written to.
So basically looking for some guidance on how you'd like to move forward (assuming you haven't already done this). Let me know.
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
Deuscovrigus ()
Date: April 20, 2010 08:24PM
If anyone still cares I have a very easy solution that works both for Visual Studio 2008 and 2010. I'll post it if I get some replies
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
pmeems ()
Date: April 22, 2010 02:50AM
We have made a build script that is building all binaries with VS2008, including GDAL with ECW and JEPG2000 support.
We're not yet compiling for 2010. Most people don't have that version. I'm doing the weekly builds and I don't have it either (yet).
Could you post your solution and explain how it is different from the one we're using?
I don't mind learning how you did it ;)
Perhaps we can enhance our build script.
Thanks,
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
We're not yet compiling for 2010. Most people don't have that version. I'm doing the weekly builds and I don't have it either (yet).
Could you post your solution and explain how it is different from the one we're using?
I don't mind learning how you did it ;)
Perhaps we can enhance our build script.
Thanks,
Paul
--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.
---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
jbarner ()
Date: January 28, 2011 01:53PM
Hello Deuscovrigus
I am definitively interested in your "simple" solution!
I have the same errors during SDK 3.3 Compilation with VS 2008!
James
I am definitively interested in your "simple" solution!
I have the same errors during SDK 3.3 Compilation with VS 2008!
James
Re: ECW (ERMapper) with VS2005 or VS2008?
Posted by:
jbarner ()
Date: February 20, 2011 02:07PM
Finally the ECW SDK 3.3 compiles with VS 2008:
This is the solution:
All the values MAXUINT...,MINUINT..., MAXINT and MININT are already defined (reserved) on Visual Studio 2008 . Rename them over the whole project to NCS_xxxxx.
James
This is the solution:
All the values MAXUINT...,MINUINT..., MAXINT and MININT are already defined (reserved) on Visual Studio 2008 . Rename them over the whole project to NCS_xxxxx.
James
Sorry, only registered users may post in this forum.


