|
|
17-03-2013, 17:58
|
#16
|
Registered User
Join Date: Mar 2013
Posts: 7
|
Re: Trouble building 3.2 on Mac
Hi jasenj1
Yes, macports is often very usefull. It would make it a lot easier for new OpenCPN developers to get started if its dependencies could just be installed using macports.
I got the error about the argument type too. I was able to fix this in https://github.com/kheyse/OpenCPN. But the problems don't stop there unfortunately.
|
|
|
18-03-2013, 02:07
|
#17
|
Registered User
Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
|
Re: Trouble building 3.2 on Mac
Quote:
Originally Posted by vortexfive
Hi jasenj1
Yes, macports is often very usefull. It would make it a lot easier for new OpenCPN developers to get started if its dependencies could just be installed using macports.
I got the error about the argument type too. I was able to fix this in https://github.com/kheyse/OpenCPN. But the problems don't stop there unfortunately.
|
It is always good practise to include code changes for a special purpose into "ifdefs" e.g.:
#ifdef __WXOSX__
new code
#else
old code
#endif
Gerhard
|
|
|
18-03-2013, 02:40
|
#18
|
Registered User
Join Date: Mar 2013
Posts: 7
|
Re: Trouble building 3.2 on Mac
Quote:
Originally Posted by CarCode
It is always good practise to include code changes for a special purpose into "ifdefs" e.g.:
#ifdef __WXOSX__
new code
#else
old code
#endif
|
Hi
Ok, but I think the changes I made are good for all operating systems. It was complaining because a %d format specifier was used instead of %ld for a long int. Maybe other systems won't throw an error for this, but it's still better to use the correct identifier I think.
|
|
|
18-03-2013, 04:50
|
#19
|
Registered User
Join Date: Mar 2013
Posts: 11
|
Re: Trouble building 3.2 on Mac
Quote:
Originally Posted by vortexfive
Hi
Ok, but I think the changes I made are good for all operating systems. It was complaining because a %d format specifier was used instead of %ld for a long int. Maybe other systems won't throw an error for this, but it's still better to use the correct identifier I think.
|
Yep, that's the error. My brief research leaned toward an issue where the exact size of the argument is platform dependent and may be indeterminate. e.g. If built with a 32-bit target %d may be all right, but with a 64-bit target %ld is correct. I'm not up on my C enough to have an opinion.
- Jasen.
|
|
|
18-03-2013, 09:54
|
#20
|
Registered User
Join Date: Dec 2011
Posts: 302
|
Re: Trouble building 3.2 on Mac
I have Just downloaded CPN 3.2.0 for Mac. Here is a screenshot of what I see.
What version of CPN for Mac should I download?
|
|
|
18-03-2013, 13:36
|
#21
|
Registered User
Join Date: Mar 2013
Posts: 7
|
Re: Trouble building 3.2 on Mac
Quote:
Originally Posted by jasenj1
My builds of OpenCPN crash with an error from wxWidgets complaining about some argument type not being correct. (Don't have that machine in front of me at the moment.) Tracing it through, it looks like a crash that gets generated if debug mode is turned on, and the error should be ignored if debug mode is off. I'm pretty sure I'm building with debug off, but the crash would indicate otherwise.
|
Apparently the default behaviour for assertions has changed in wxWidgets 2.9.1. They are now always enabled, even if not in debug mode, unless explicitly silenced. This can be done by adding wxDisableAsserts(); in chart1.cpp, MyApp::OnInit(). This prevents my build from crashing too often.
|
|
|
18-03-2013, 17:35
|
#22
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,387
|
Re: Trouble building 3.2 on Mac
vortexfive...
Still cannot make full sense of the profile trace. Would not do me much good to compare to the wx2.8 Release image, I think.
Try drilling down further into the InitRGBA, etc, in order to find out exactly where we are spending the time. What the heck is CFRelease(), and why is it so slow? From Apple docs, it seems like some kind of object management library function. What is being released?
Dave
|
|
|
18-03-2013, 22:26
|
#23
|
Registered User
Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
|
Re: Trouble building 3.2 on Mac
Quote:
Originally Posted by Tar34
I have Just downloaded CPN 3.2.0 for Mac. Here is a screenshot of what I see.
What version of CPN for Mac should I download?
|
Night Navigation | Official OpenCPN Homepage
Press F6 repeatably or about the 10nt button from the left in the tool bar.
|
|
|
07-04-2013, 16:19
|
#25
|
Registered User
Join Date: Jun 2011
Location: 27south
Boat: Easton 47
Posts: 65
|
The state of Mac O
Quote:
Originally Posted by vortexfive
|
Thanks for the heads up on that....may save the remaining hair !!
Mo
|
|
|
15-04-2013, 11:59
|
#26
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,387
|
Re: Trouble building 3.2 on Mac
Guys....
Well, this is a MAJOR speedbump for OCPN on 64bit Mac Cocoa.
It seems that wxWidgets 2.9.4 throws up its hands in dispair when it comes to efficiently implementing the wxRegion class. The wx 2.9.4 implementation will in no way have the performance necessary for OCPN, which depends on this class heavily for quilting and cm93 support.
I'll start looking at options. We will probably have to implement an OCPN native class to replace (or subclass from) wxRegion. Maybe we can use a gdk equivalent, as in the linux port?? ...or another open source region library??...
Ideas?
Rats
Dave
|
|
|
15-04-2013, 12:17
|
#27
|
Registered User
Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
|
Re: Trouble building 3.2 on Mac
I'm afraid gdk doesn't work either. Might be better to wait for a solution from Stefan Csomor. He knows the OS X API better than anyone else.
|
|
|
15-04-2013, 15:28
|
#28
|
Marine Service Provider
Join Date: Mar 2008
Posts: 7,387
|
Re: Trouble building 3.2 on Mac
Carcode...
Who is Stefan Csomor? How can he help us?
You are correct that polygon regions are deprecated in modern versions of gdk, in favor of cairo.
However, gdk could work if we extract the source from an older version of gdk, and compile it into OCPN. I looked at this, and find that the region stuff in gdk is not dependent upon the graphics backend, but is simple logic and data structures.
Not as pretty as using a prebuilt library, but would work. It currently works in wxWidgets for linux....
Cairo may work in OSX as a linked library, and may be cleaner.
Dave
|
|
|
16-04-2013, 00:40
|
#29
|
Registered User
Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
|
Re: Trouble building 3.2 on Mac
Stefan Csomor is one of the wxWidgets team. He is also co-author of Prentice Hall book "Cross-Platform Gui Programming with wxWidgets", ISBN 0-13-147381-6, a very helpful tutorial for starting programming with wxWidgets.
He has done the wxRegion implementation for wxWidgets 2.8 and Mac already and I hope he find a better way for 2.9 and Mac Cocoa. Indeed the poligon region has no native API in Mac OS X.
|
|
|
25-05-2013, 03:20
|
#30
|
Registered User
Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,537
|
Re: Trouble building 3.2 on Mac
Actually there is some progress for better support of regions in Mac OS X.
See: git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Gerhard
|
|
|
|
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
Advertise Here
Recent Discussions |
|
|
|
|
|
|
|
|
|
|
|
|
Vendor Spotlight |
|
|
|
|