Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 13-03-2014, 16:08   #16
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
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, 15: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, 17:07   #18
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
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, 18: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, 20: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, 20:54   #21
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,803
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
__________________
boat_alexandra is offline   Reply With Quote
Old 14-03-2014, 21: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, 04:17   #23
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
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, 04:21   #24
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
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, 18: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, 03:55   #26
Registered User

Join Date: Jul 2010
Location: Monastir, Tunisia
Boat: Amel Sharki
Posts: 1,774
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

Thread Tools
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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 21:54.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.