Cruisers Forum
 


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 22-01-2021, 05:04   #1
Registered User

Join Date: May 2014
Posts: 908
Images: 2
Developer Environment

I have been trying to set up the developer environment for OpenCPN under Windows 7.

I have followed the manual for compiling in Windows. There are a few discrepancies in the instructions, due to changes in the various sites, that I will note when I have it all working.

All instructions appeared to work OK except these commands failed in the Command Window - not sure about the _xp does this relate to Windows Platform?

cd C:\Users\myname\Sources\OpenCPN

mkdir build

cd build

cmake -G "Visual Studio 15 2017" -T v141_xp ..

cmake --build .

cmake --build . --config release

cmake --build . --config release --target package


I tried loading the code directly from within VS(2017) but have been met with

Retarget Projects

Win SDK - 10.0.17763.0 ; 10.0.17734.0 ; 10.0.16299.0 ; No Upgrade

Toolset - Upgrade to v141 ; No Upgrade

Can anyone tell me what are the correct options?
Tupaia is offline   Reply With Quote
Old 22-01-2021, 08:13   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,258
Re: Developer Environment

The v141_xp target means that the final product will be compatible with Windows XP, while being build with newer SDK and toolchain. Support for that needs to be installed as an optional component of VisualStudio called "Windows XP support for C++" (As mentioned in the manual). That seems to may be missing in your environment.

Unless you want to distribute the results of your local builds and make them compatible with official OpenCPN releases, it really does not matter what target you use.

Actually you will make your life as a developer much easier, especially building all the dependencies, if you ignore XP completely as support for it is being dropped everywhere and it starts to be very difficult to build the libraries compatible with XP. That's why we also provide them prebuilt.
nohal is online now   Reply With Quote
Old 22-01-2021, 09:12   #3
Registered User

Join Date: Jul 2010
Location: Kalamata, Greece
Boat: Amel Sharki
Posts: 2,238
Re: Developer Environment

Even though several people use it but I guessed Windows 7 is outdated now and not supported by Microsoft anymore?
CarCode is offline   Reply With Quote
Old 22-01-2021, 09:16   #4
Registered User

Join Date: May 2014
Posts: 908
Images: 2
Re: Developer Environment

OK thanks I will clear the machine and move it to Win 10 and reinstall the environment.
Tupaia is offline   Reply With Quote
Old 22-01-2021, 09:38   #5
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 3,111
Re: Developer Environment

Quote:
Originally Posted by Tupaia View Post
I have been trying to set up the developer environment for OpenCPN under Windows 7.

I have followed the manual for compiling in Windows. There are a few discrepancies in the instructions, due to changes in the various sites, that I will note when I have it all working.

All instructions appeared to work OK except these commands failed in the Command Window - not sure about the _xp does this relate to Windows Platform?

cd C:\Users\myname\Sources\OpenCPN

mkdir build

cd build

cmake -G "Visual Studio 15 2017" -T v141_xp ..
I use to build on my Win(10) for VS2017 more or less every day.

I use to stop the cmd handling after the cmake... above.

From there I double click on ../build/OpenCPN.sln or in VS2017 File->Open->Project/Solution and point to ../build/OpenCPN.sln
Then when all is initialized change to "RelWithDebInfo" and wait for init again. then Ctrl-Shift-B for Build->Build Solution.


When you run cmake -G "Visual Studio 15 2017" -T v141_xp .. ( or cmake -T v141_xp ..) study what's going on and check that VS 2017 is found. Well, the very first row should be like:
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
If you think anything is screwed up with the /build environment just delete the catalog and run cmake.... again.


Håkan
Hakan is offline   Reply With Quote
Old 24-01-2021, 07:54   #6
Registered User

Join Date: May 2014
Posts: 908
Images: 2
Re: Developer Environment

Installed Win 10 and reinstalled envvironment from scratch

I left out the xp toolset, not sure if this was correct.
Running without the _xp

cmake -G "Visual Studio 15 2017" -T v141 ..

Yeilds

CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Gettext (missing: GETTEXT_MSGMERGE_EXECUTABLE
GETTEXT_MSGFMT_EXECUTABLE)

Can you point me in the right direction to fix?

Thanks
Tupaia is offline   Reply With Quote
Old 24-01-2021, 08:05   #7
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 5,258
Re: Developer Environment

You are missing Gettext. Did you follow https://opencpn.org/wiki/dokuwiki/do...windows#poedit and if you did can you make double sure the PATH environment variable is correct in you shell session?
nohal is online now   Reply With Quote
Old 24-01-2021, 10:27   #8
Registered User

Join Date: May 2014
Posts: 908
Images: 2
Re: Developer Environment

Quote:
Originally Posted by nohal View Post
You are missing Gettext. Did you follow https://opencpn.org/wiki/dokuwiki/do...windows#poedit and if you did can you make double sure the PATH environment variable is correct in you shell session?

Forgot to add the PATH after OS install. Thanks I now have OpenCPN.sln.
Tupaia is offline   Reply With Quote
Reply

Tags
environment, men

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rpi Developer says "slimm(ing) down your application". How ? NahanniV OpenCPN 74 20-06-2019 18:04
Plug-in Developer's Example Request Mike BYC OpenCPN 0 20-11-2015 04:47
openCPN Developer forum? oscarkramer OpenCPN 3 19-05-2014 10:33
Liveaboard Software Developer RafalManka_PL Liveaboard's Forum 14 29-04-2013 09:01
Need a sailing blog for your trip? I'm a web developer! vveerrgg Classifieds Archive 0 20-08-2008 07:27

Advertise Here


All times are GMT -7. The time now is 20:14.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2021, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.