[PROJ] Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017

classic Classic list List threaded Threaded
5 messages Options
A
Reply | Threaded
Open this post in threaded view
|

[PROJ] Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017

A
In an effort to reduce our software licensing costs, I have been tasked into looking at the level of effort required to remove our dependency on a commercial vendor's SDK and replace it with something else. Preliminary investigations indicate that PROJ.4 version 6.x may fit the bill. However, I have been struggling to get PROJ.4 to build successfully. We are a Windows shop and our custom built applications run in this OS environment. Unfortunately we do not have the luxury of porting all our apps to Linux at this time.

Has anyone successfully built PROJ v6.1.0 using cmake and visual studio 2017 on Windows 10? I have followed the instructions on the PROJ.4 website, but with no luck. After installing sqlite3 and extracting the proj-6.1.0.tar archive, I ran cmake. This is my command line.

cmake -DSQLITE3_INCLUDE_DIR=C:\temp\sqlite3 -DSQLITE3_LIBARARY=C:\temp\sqlite3\sqlite3.dll -G "Visual Studio 15 2017 Win64" ..

There are several fatal errors. Here are a few of them from the CMakeError.log.

fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

These are the versions of the tools I am using.

Windows 10 Enterprise v10.0.17134 Build 17134
cmake version 3.14.4
sqlite3 version 3.29.0
Visual Studio 2017 v15.9.12

In fact, v6.0.0 and v5.2.0 also reported the same cmake errors. I even tried Visual Studio 2013 (also with no luck)

However, I was able to build PROJ.4 v4.9.3 successfully. Unfortunately to continue my evaluation, I need to test the WKT string capabilities of the proj_create function. Only version 6.x supports this WKT functionality.

Further, I did read through the mail archives and came across a thread posted by a.furieri, but the replier's answer was to use MinGW64 and MYSY2. I would prefer to stick with cmake and VS2017.


_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017

Kristian Evers-3
Try having a look at Mateusz’ howto: https://github.com/OSGeo/proj.4/wiki/Building-with-VS-and-vcpkg

/Kristian

On 29 May 2019, at 21:31, A <[hidden email]> wrote:

In an effort to reduce our software licensing costs, I have been tasked into looking at the level of effort required to remove our dependency on a commercial vendor's SDK and replace it with something else. Preliminary investigations indicate that PROJ.4 version 6.x may fit the bill. However, I have been struggling to get PROJ.4 to build successfully. We are a Windows shop and our custom built applications run in this OS environment. Unfortunately we do not have the luxury of porting all our apps to Linux at this time.

Has anyone successfully built PROJ v6.1.0 using cmake and visual studio 2017 on Windows 10? I have followed the instructions on the PROJ.4 website, but with no luck. After installing sqlite3 and extracting the proj-6.1.0.tar archive, I ran cmake. This is my command line.

cmake -DSQLITE3_INCLUDE_DIR=C:\temp\sqlite3 -DSQLITE3_LIBARARY=C:\temp\sqlite3\sqlite3.dll -G "Visual Studio 15 2017 Win64" ..

There are several fatal errors. Here are a few of them from the CMakeError.log.

fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

These are the versions of the tools I am using.

Windows 10 Enterprise v10.0.17134 Build 17134
cmake version 3.14.4
sqlite3 version 3.29.0
Visual Studio 2017 v15.9.12

In fact, v6.0.0 and v5.2.0 also reported the same cmake errors. I even tried Visual Studio 2013 (also with no luck)

However, I was able to build PROJ.4 v4.9.3 successfully. Unfortunately to continue my evaluation, I need to test the WKT string capabilities of the proj_create function. Only version 6.x supports this WKT functionality.

Further, I did read through the mail archives and came across a thread posted by a.furieri, but the replier's answer was to use MinGW64 and MYSY2. I would prefer to stick with cmake and VS2017.

_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj


_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
A
Reply | Threaded
Open this post in threaded view
|

Re: Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017

A
Hi Kristian,

I will have a look at the link you provided. After googling for days, I'm surprised your link did not show up in my search results. I do appreciate your responding to my query so quickly. Thank you.

Regards,
rifhc
 
Try having a look at Mateusz’ howto: https://github.com/OSGeo/proj.4/wiki/Building-with-VS-and-vcpkg

/Kristian

On 29 May 2019, at 21:31, A <[hidden email]> wrote:

In an effort to reduce our software licensing costs, I have been tasked into looking at the level of effort required to remove our dependency on a commercial vendor's SDK and replace it with something else. Preliminary investigations indicate that PROJ.4 version 6.x may fit the bill. However, I have been struggling to get PROJ.4 to build successfully. We are a Windows shop and our custom built applications run in this OS environment. Unfortunately we do not have the luxury of porting all our apps to Linux at this time.

Has anyone successfully built PROJ v6.1.0 using cmake and visual studio 2017 on Windows 10? I have followed the instructions on the PROJ.4 website, but with no luck. After installing sqlite3 and extracting the proj-6.1.0.tar archive, I ran cmake. This is my command line.

cmake -DSQLITE3_INCLUDE_DIR=C:\temp\sqlite3 -DSQLITE3_LIBARARY=C:\temp\sqlite3\sqlite3.dll -G "Visual Studio 15 2017 Win64" ..

There are several fatal errors. Here are a few of them from the CMakeError.log.

fatal error C1083: Cannot open include file: 'dlfcn.h': No such file or directory
fatal error C1083: Cannot open include file: 'jni.h': No such file or directory
fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory

These are the versions of the tools I am using.

Windows 10 Enterprise v10.0.17134 Build 17134
cmake version 3.14.4
sqlite3 version 3.29.0
Visual Studio 2017 v15.9.12

In fact, v6.0.0 and v5.2.0 also reported the same cmake errors. I even tried Visual Studio 2013 (also with no luck)

However, I was able to build PROJ.4 v4.9.3 successfully. Unfortunately to continue my evaluation, I need to test the WKT string capabilities of the proj_create function. Only version 6.x supports this WKT functionality.

Further, I did read through the mail archives and came across a thread posted by a.furieri, but the replier's answer was to use MinGW64 and MYSY2. I would prefer to stick with cmake and VS2017.

_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj


_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017

Mateusz Loskot
On Wed, 29 May 2019 at 21:50, A <[hidden email]> wrote:
>
> Hi Kristian,
>
> I will have a look at the link you provided. After googling for days,
> I'm surprised your link did not show up in my search results.
> I do appreciate your responding to my query so quickly.

If an open source project of your interest uses Travis CI,
AppVeyor, Azure Pipelines, etc., first inspect how it
builds itself on those CI services

https://github.com/OSGeo/proj.4/blob/master/appveyor.yml#L22-L44

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj
A
Reply | Threaded
Open this post in threaded view
|

Re: Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017

A
Hi Mateusz,

After looking at the links you and Kristian sent and with some tweaking, I was able to build version PROJ 6.1.0. Woo Hoo! Now the hard part comes, coming up with a level of effort for my managers. Thank you for your help!

Regards,
rifhc



From: PROJ <[hidden email]> on behalf of Mateusz Loskot <[hidden email]>
Sent: May 29, 2019 1:55 PM
To: [hidden email]
Subject: Re: [PROJ] Anyone have success using cmake to build proj.4 version 6.1.0 with visual studio 2017
 
On Wed, 29 May 2019 at 21:50, A <[hidden email]> wrote:
>
> Hi Kristian,
>
> I will have a look at the link you provided. After googling for days,
> I'm surprised your link did not show up in my search results.
> I do appreciate your responding to my query so quickly.

If an open source project of your interest uses Travis CI,
AppVeyor, Azure Pipelines, etc., first inspect how it
builds itself on those CI services

https://github.com/OSGeo/proj.4/blob/master/appveyor.yml#L22-L44

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj

_______________________________________________
PROJ mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/proj