Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 13-03-2014, 15:08   #16
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: OSX Development / Compile Questions

Quote:
Originally Posted by bjbest View Post
Regarding Xcode versions, the Xcode 5.1 update wasn't available on March 6th when I last updated my toolchain to build OpenCPN and I haven't rebuilt since that 5.1 update became available.

Regarding lines in the syslog, I don't have any log messages in opencpn.log (or anywhere else) matching the string "CoreText".

Cheers,

Brad
I talk about system.log not opencpn.log.

If you want to use Xcode 5.1 then make a define _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_

So you have not to patch code in printtable.cpp and routeprintout.cpp.

Gerhard
CarCode is offline   Reply With Quote
Old 14-03-2014, 14:30   #17
Registered User

Join Date: Mar 2014
Posts: 5
Re: OSX Development / Compile Questions

Gerhard,

Sorry for not being clear -- the "anywhere else" meant that I checked all the system logs for "CoreText" and it doesn't appear in any log.

The patch I mentioned was using exactly the define you suggested. I just added it to the source files that produced the wxWidgets conflict. If it's added as a patch, this fixes the problem for anybody compiling using OS X. Isn't that preferable?

How did you handle the conflicts caused by scrollingdialog.h and scrollingdialog.cpp with wxWidgets >=3.x? (I'd prefer to follow your conventions while I'm getting to know the code.)

Cheers,

Brad

Quote:
Originally Posted by CarCode View Post
I talk about system.log not opencpn.log.

If you want to use Xcode 5.1 then make a define _WCHAR_H_CPLUSPLUS_98_CONFORMANCE_

So you have not to patch code in printtable.cpp and routeprintout.cpp.

Gerhard
bjbest is offline   Reply With Quote
Old 14-03-2014, 16:07   #18
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: OSX Development / Compile Questions

Quote:
Originally Posted by bjbest View Post
Gerhard,

Sorry for not being clear -- the "anywhere else" meant that I checked all the system logs for "CoreText" and it doesn't appear in any log.

The patch I mentioned was using exactly the define you suggested. I just added it to the source files that produced the wxWidgets conflict. If it's added as a patch, this fixes the problem for anybody compiling using OS X. Isn't that preferable?

How did you handle the conflicts caused by scrollingdialog.h and scrollingdialog.cpp with wxWidgets >=3.x? (I'd prefer to follow your conventions while I'm getting to know the code.)

Cheers,

Brad
If you are not using console.app go to /private/var/log/ where you find the system.log file. Any app using wxWidgets as e.g. Poedit is affected also.

scrollingdialog is not used since a long time. Get the latest OpenCPN sources with git and you will see lines like that:

Code:
#if wxCHECK_VERSION(2, 9, 0)
#include <wx/dialog.h>
#else
#include "scrollingdialog.h"
#endif
I don't know exactly when it was changed in the code, probably when Dave switched from 2.8 to 2.9 for OS X builds.

Gerhard
CarCode is offline   Reply With Quote
Old 14-03-2014, 17:46   #19
Registered User

Join Date: Mar 2014
Posts: 5
Re: OSX Development / Compile Questions

I am using console.app -- that's how I checked all of the logs.

I also already provided the OpenCPN version number I was working with above (3.3.419, obtained using git), along with the versions of everything else in my toolchain on that date.

It looks like something about the way I'm building is preventing the OpenCPN sources from verifying the wxWidgets version number (3.0.0), or it thinks I'm still using some old version, since I had to manually remove scrollingdialog.cpp and .h to get it to work.

Like others, I started with the instructions on the website for building for OS X (which didn't work as-is for Mavericks). Any suggestions about how to get the OpenCPN compile to recognize the wxWidgets version at compile time (rather than just at linking time)? How can I contribute to the OS X instructions page to update it?

Cheers,

Brad

Quote:
Originally Posted by CarCode View Post
If you are not using console.app go to /private/var/log/ where you find the system.log file. Any app using wxWidgets as e.g. Poedit is affected also.

scrollingdialog is not used since a long time. Get the latest OpenCPN sources with git and you will see lines like that:

Code:
#if wxCHECK_VERSION(2, 9, 0)
#include <wx/dialog.h>
#else
#include "scrollingdialog.h"
#endif
I don't know exactly when it was changed in the code, probably when Dave switched from 2.8 to 2.9 for OS X builds.

Gerhard
bjbest is offline   Reply With Quote
Old 14-03-2014, 19:38   #20
Registered User

Join Date: Feb 2014
Location: Deland, Fl
Boat: Tartan, 4100, 41'
Posts: 4
Re: OSX Development / Compile Questions

Quote:
Originally Posted by stensmo View Post
Since you have a MBP Retina, maybe you could try to make OpenCPN run at Retina resolution? It would be appreciated.
Works fine at Retina resolution.
rjlanza is offline   Reply With Quote
Old 14-03-2014, 19:54   #21
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OSX Development / Compile Questions

I have a branch in my fork of opencpn to build with wx-3.0 I believe the master branch can work with 2.8 or 2.9 only? Maybe it can work with 3.0 on macos, but I needed to make changes to build on linux and windows.

github.com/seandepagnier/OpenCPN
seandepagnier is offline   Reply With Quote
Old 14-03-2014, 20:09   #22
Registered User

Join Date: Feb 2014
Location: Deland, Fl
Boat: Tartan, 4100, 41'
Posts: 4
Re: OSX Development / Compile Questions

Gerhard,

I've tried your settings without success. I've been able to build successfully by changing the C++ dialect to GNU++98, C++ standard library to libstdc++, and wxWidgets 2.9.5. After double checking your settings multiple times I noticed that it appears you are using a 5.0 compiler. My system has 5.1, I'm wondering if that could be the difference?
rjlanza is offline   Reply With Quote
Old 15-03-2014, 03:17   #23
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: OSX Development / Compile Questions

Quote:
Originally Posted by rjlanza View Post
Works fine at Retina resolution.
Sure it works with Retina display but not in HiDPI resolution. With high resolution the pixel density quadruples, 4 pixels on screen for each point whereas a point is usually 1/72 of an inch. By default Cocoa apps are scaled automatically however graphic resources such as icons, bitmaps must be created at twice the pixel density. Such images have exactly twice the height and width of standard resolution counterparts and follow naming conventions e.g. "fish.png" for normal pics and "fish@2x.png" for high resolution pics. Among other things all graphics used in OpenCPN has to be changed to have a real Retina app.

Gerhard
CarCode is offline   Reply With Quote
Old 15-03-2014, 03:21   #24
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: OSX Development / Compile Questions

Quote:
Originally Posted by rjlanza View Post
Gerhard,

I've tried your settings without success. I've been able to build successfully by changing the C++ dialect to GNU++98, C++ standard library to libstdc++, and wxWidgets 2.9.5. After double checking your settings multiple times I noticed that it appears you are using a 5.0 compiler. My system has 5.1, I'm wondering if that could be the difference?
I use Xcode 5.1, wxWidgets 3.1.0, OS X 10.9.2 and no command line build.

Gerhard
CarCode is offline   Reply With Quote
Old 15-03-2014, 17:29   #25
Registered User

Join Date: Feb 2014
Location: Deland, Fl
Boat: Tartan, 4100, 41'
Posts: 4
Re: OSX Development / Compile Questions

Quote:
Originally Posted by CarCode View Post
I use Xcode 5.1, wxWidgets 3.1.0, OS X 10.9.2 and no command line build.

Gerhard
Gerhard,

What do you mean by "no command line build"?

With 5.1 and wxWidgets 3.1.0 do you change any of the Xcode settings? Do you start by "cmake -G Xcode ../ ?

I saw the post concerning 5.1 where you advised defining "_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_" . Do you think this is the equivalent to making the c++ dialect change?
rjlanza is offline   Reply With Quote
Old 16-03-2014, 02:55   #26
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,541
Re: OSX Development / Compile Questions

Quote:
Originally Posted by rjlanza View Post
Gerhard,

What do you mean by "no command line build"?

With 5.1 and wxWidgets 3.1.0 do you change any of the Xcode settings? Do you start by "cmake -G Xcode ../ ?

I saw the post concerning 5.1 where you advised defining "_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_" . Do you think this is the equivalent to making the c++ dialect change?
"cmake", "make" etc. are commands. I don't use but Xcode only. So I build not with the command line tools of Xcode or Clang but with its graphical user interface (GUI) to have all its supplement tools available with a mouse click. The define is for the data type "wchar" only.

Gerhard
CarCode is offline   Reply With Quote
Reply

Tags
men


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


Advertise Here


All times are GMT -7. The time now is 17:09.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.