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 25-10-2010, 05:05   #1
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
wxWidgets Version 2.9 for OpenCPN (Experimental)

Hello source builders!

Here are the steps needed to build opencpn for wxWidgets 2.9.1.

1. Get wxWidgets 2.9.1 source tarball from wxwidgets.org
2. Build wxWidgets.

I build test versions of wxWidgets in subdirectories, and the use wx-config to link to the built libraries without "installing" the libraries and possibly corrupting my basic setup.

So, in the directory
{whatever}/wxWidgets-2.9.1/build_gtk_debug

I used the configure line as follows:

../configure --enable-gtk --with-debug_flag --with-debug_info --enable-debug --with-libjpeg LDFLAGS=-rdynamic --without-subdirs --prefix=/usr --enable-graphics_ctx --enable-aui

Then make, but DO NOT install.

3. Build OpenCPN, using the 2.9.1 includes and libraries.
a. In your opencpn build directory, delete the cache file CMakeCache.txt
b. Run cmake like this:
cmake -D wxWidgets_CONFIG_EXECUTABLE:FILEPATH={whatever}/wxWidgets-2.9.1/build_gtk_debug/wx-config ..

Please note the ".." at the end of the last line.

c. The make, sudo make install, and you are ready to go.
There will be some warning messages shown during the "make" step. I am ignoring them for now.


I consider wxWidgets 2.9 support for opencpn to be preliminary at this point. For one thing, it seems that the CMake modules necessary to automatically find an installed build of 2.9.1 are faulty. Thus the forced wx-config method used above.
So this is all experimental at this point, and I welcome plus or minus feedback as we work through this migration process.

Thanks, and good luck
Dave
bdbcat is offline   Reply With Quote
Old 25-10-2010, 13:02   #2
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
Hi Dave

Build 1026 with vs10 and wxWidgets 2.9.1 builds fine on Vista. DIBSections were commented out.

Everything seems to work except the Dashboard plugin which does not show any valid selections in the Add menu.

Outstanding!!!

Chuck
ChuckSK is offline   Reply With Quote
Old 25-10-2010, 13:19   #3
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Chuck....

Thanks for trying this out. I knew that Dashboard PlugIn was not working, but turned a blind eye so far.

DIBSections commented out? Where, please? Who complains?

Really, the immediate goal is for the Mac build to now proceed further, and catch up with the rest of the group.....

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 25-10-2010, 13:39   #4
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Dave,
I didn't look at it any close, but the build against wx 2.9.1 / VS 2008 fails on

Code:
5>ocpn_pixel.cpp
5>..\src\ocpn_pixel.cpp(1157) : error C2065: 'm_oldBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1159) : error C2065: 'm_oldBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1160) : error C2065: 'm_selectedBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1160) : error C2228: left of '.Ok' must have class/struct/union
5>        type is ''unknown-type''
5>..\src\ocpn_pixel.cpp(1165) : error C2065: 'm_selectedBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1201) : error C2065: 'm_oldBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1203) : error C2065: 'm_oldBitmap' : undeclared identifier
Pavel
nohal is offline   Reply With Quote
Old 25-10-2010, 13:40   #5
Registered User

Join Date: Apr 2009
Location: Marina Del Rey
Boat: Hylas 44
Posts: 387
ocpnMemDC::SelectObject cannot see m_oldBitmap and m_selectedBitmap.

wxMemoryDC has been changed to hide those objects.

Chuck
ChuckSK is offline   Reply With Quote
Old 25-10-2010, 14:16   #6
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Chuck/Pavel...

Oh dear. I pulled a slight-of-hand trick on this class to boost performance. It always comes back to bite.

Fortunately, now, (3 years later), almost everyone has fast machines available to run on, so we can probably revert to squeaky clean portability. I started this project with 300 Mhz K-6......

Thanks
Dave
bdbcat is offline   Reply With Quote
Old 30-10-2010, 02:57   #7
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Dave

There were no problems building on Ubuntu 10.4, following your instructions. As mentioned before, there is problems with the dashboard plugin. I shows up as an empty box.
When leaving the plugin tab an assertion error comes up.

Thomas
Attached Thumbnails
Click image for larger version

Name:	2.9.png
Views:	269
Size:	113.3 KB
ID:	20631  
Attached Files
File Type: doc assertion.txt.doc (3.9 KB, 62 views)
cagney is offline   Reply With Quote
Old 06-06-2011, 10:44   #8
Registered User

Join Date: Jun 2011
Posts: 1
Re: wxWidgets Version 2.9 for OpenCPN (Experimental)

Hi!
I´m trying to build OpenCPN (using wx 2.9.1 and Visual C++ 2008) and getting these errors too, plus those errors below.
Can anyone help me?

Thanks!

Elias

Code:
1>..\src\chcanv.cpp(2013) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>..\src\chcanv.cpp(2013) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
1>..\src\chcanv.cpp(7067) : error C2065: 'pitem' : undeclared identifier
1>..\src\chcanv.cpp(7067) : error C2227: left of '->SetTextColour' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>..\src\chcanv.cpp(7068) : error C2065: 'pitem' : undeclared identifier
1>..\src\chcanv.cpp(7068) : error C2227: left of '->SetBackgroundColour' must point to class/struct/union/generic type
1>        type is ''unknown-type''

Quote:
Originally Posted by nohal View Post
Dave,
I didn't look at it any close, but the build against wx 2.9.1 / VS 2008 fails on

Code:
5>ocpn_pixel.cpp
5>..\src\ocpn_pixel.cpp(1157) : error C2065: 'm_oldBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1159) : error C2065: 'm_oldBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1160) : error C2065: 'm_selectedBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1160) : error C2228: left of '.Ok' must have class/struct/union
5>        type is ''unknown-type''
5>..\src\ocpn_pixel.cpp(1165) : error C2065: 'm_selectedBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1201) : error C2065: 'm_oldBitmap' : undeclared identifier
5>..\src\ocpn_pixel.cpp(1203) : error C2065: 'm_oldBitmap' : undeclared identifier
Pavel
elias is offline   Reply With Quote
Old 06-06-2011, 11:06   #9
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,208
Re: wxWidgets Version 2.9 for OpenCPN (Experimental)

Elias,
to be honest since then I tried just once to build wxWidgets SVN trunk and went away as soon as it failed. Any particular reason to try? 2.9.1 is way too buggy to use and I really had no time to go with the trunk lately. Will probably have another look at it after OpenCPN 2.5 is out, but until then I really suggest you to stick with wx 2.8 which should not give you problems if you follow the build instructions at Compiling - Windows | Official OpenCPN Homepage (and especially pay attention not to mix ANSI and Unicode stuff).

Pavel
nohal is offline   Reply With Quote
Reply


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
OpenCPN Version 2.2 Beta Test bdbcat OpenCPN 437 15-12-2010 19:17
OpenCPN Version 2.2 Beta Test Bugs / Discussion bdbcat OpenCPN 120 26-09-2010 02:53
OpenCPN Version 2.1.0 Beta bdbcat OpenCPN 1045 25-06-2010 10:09
OpenCPN Version 1.3.5 Beta Technical bdbcat OpenCPN 544 24-03-2010 10:34
OpenCPN Version 1.3.6 Release bdbcat OpenCPN 32 30-01-2010 05:07

Advertise Here


All times are GMT -7. The time now is 08:25.


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.