MapWindow / MapWinGIS

MapWinGIS.ocx is a FREE and OPEN SOURCE C++ based geographic information system programming ActiveX Control and application programmer interface (API) that can be added to a Windows Form in Visual Basic, C#, Delphi, or other languages that support ActiveX, providing your app with a map. Go to our forum for questions and help:
https://mapwindow.discourse.group/
Mozilla Public License 2.0
270 stars 134 forks source link

Delphi: MapWinGIS_TLB.pas doesn't compile #212

Open oldwired opened 3 years ago

oldwired commented 3 years ago

MapWinGIS_TLB.pas doesn't compile under Delphi (10.4.2, but should be a general problem.

[dcc32 Error] MapWinGIS_TLB.pas(16332): E2029 ';' expected but '.' found [dcc32 Error] MapWinGIS_TLB.pas(16334): E2003 Undeclared identifier: 'DefaultInterface' [dcc32 Error] MapWinGIS_TLB.pas(16334): E2066 Missing operator or semicolon [dcc32 Error] MapWinGIS_TLB.pas(16334): E2003 Undeclared identifier: 'yLatitude' [dcc32 Error] MapWinGIS_TLB.pas(16334): E2003 Undeclared identifier: 'xLongitude' [dcc32 Error] MapWinGIS_TLB.pas(9869): E2065 Unsatisfied forward or external declaration: 'TMap.SetLatitudeLongitude' [dcc32 Fatal Error] Unit1.pas(7): F2063 Could not compile used unit 'MapWinGIS_TLB.pas' Failed Elapsed time: 00:00:00.2

If you look at MapWinGIS_TLB:16332 you can see that procedure TmwMap.SetLatitudeLongitude(yLatitude: Double; xLongitude: Double); should be procedure TMap.SetLatitudeLongitude(yLatitude: Double; xLongitude: Double); There is a superflous "mw" in the name of the class.

mainxt commented 3 years ago

Which version of MapWinGIS are you trying to compile? And where do you get MapWinGIS_TLB.pas create yourself or take from github? I will assume that if you are trying to use an existing package ... it is outdated as it was built for version 5.1 and does not reflect the latest changes for version 5.2.4.

mainxt commented 3 years ago

I get it ... you tried to install it wrong. Try to install with MapWinGIS.Delphi.Component.v5.1.0.zip But it does not support some of the 5.2.4 features. Need to update ....

You can try this

oldwired commented 3 years ago

I installed (the 32 Bit built) 5.2 Release from here: https://github.com/MapWindow/MapWinGIS/releases/tag/v5.2.4 compiled and installed the component from the Zip Folder and used the MapWinGIS_TLB.pas that gets copied into the installation directory. Now I see where I went wrong (I should not have used the .pas from the install folder), but it's all a bit confusing.