Porting w32 to linux Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Ravilj
Knows some wx things
Knows some wx things
Posts: 40
Joined: Mon Aug 22, 2005 3:49 pm

Porting w32 to linux

Post by Ravilj » Tue Aug 23, 2005 1:15 am

I am slightly confuzzled right now.

I have been developing an app using VS 2k3 .net for win32. It runs perfectly under win32. It makes us of the wxGLcanvas class and a couple others. I installed wxWidgets 2.6 and have been using that.

Now I would like to port the app to linux. I am running gentoo. Now I am new to linux developement. I emerged (installed) wxGTK. Now the thing I am confused about is:
What is the equivalent to wxWidgets? What I mean by this is do i use wxGTK or wxX11 or what ever but still maintaining the openGL canvas and such?
How do I used them?
How do I check what version of wxWindows is available?
What would I need to change to get the code to work in linux from the current code that is working in windows?

I am using kdevelop in linux.

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Tue Aug 23, 2005 7:40 am

Hi!
To use wxWidgets under Linux, you'll first have to compile it and enable all the features you need. For basic installation and compiling read here http://heanet.dl.sourceforge.net/source ... -2.6.1.txt
You can call "../configure --help" to see all available options. To enable OpenGL support you'll need to add --with-opengl for configure.

Once configure finished, you can call "make" and "make install" to compile and install wxWidgets.
What is the equivalent to wxWidgets? What I mean by this is do i use wxGTK or wxX11 or what ever but still maintaining the openGL canvas and such?
wxWidgets wraps the underlying GUI framework on every platform. GTK and X11 are the frameworks supported on Unix. GTK is newer, X11 is the "standard" framework. Most systems should support GTK and I'd go with that. GTK is used by the Gnome desktop environment. If it's installed your apps will run on KDE, too.
How do I used them?
Configure, make, make install, like I said before. Read the install.txt.
How do I check what version of wxWindows is available?
After compiling and installing
wx-config --version
should return the available versions.
What would I need to change to get the code to work in linux from the current code that is working in windows?
In most cases: Install wxWidgets, compile your app, link with wxWidgets, be happy :D
There may be some issues with layout out and you may have to adapt that, but normaly apps will run just fine. That's what wxWidgets is for after all :D
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

Ravilj
Knows some wx things
Knows some wx things
Posts: 40
Joined: Mon Aug 22, 2005 3:49 pm

Post by Ravilj » Tue Aug 23, 2005 12:08 pm

I am running gentoo which uses ebuilds so you dont specifically do the ./configure and make yourself. Anyway wxGTK is now installed.

I have both wxwindows 2.4 and 2.6 installed since both
wx-config and wx-config-2.6 work.

k now I assume the issue is that kdevelop etc are using 2.4 and not 2.6.
I have the following:
/usr/include/wx
/usr/include/wx-2.6/wx

How do I set 2.6 to be the default?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4152
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Thu Aug 25, 2005 5:20 pm

Hi, Ravilj,
Under Gentoo you will use wxGTK.
Now it's up to you what version to use. What you probably need is to change the Makefile for KDevelop, that located in the direcory, where your program located.

But that's the question to he KDevelop forum.

Thank you.

Post Reply