Convert Windows GUI to Linux GUI

This is a discussion on Convert Windows GUI to Linux GUI within the Linux Programming forums, part of the Platform Specific Boards category; I must convert a Windows GUI application to a Linux GUI application. Unfortunately, my Linux experience is almost nil. The ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059

    Convert Windows GUI to Linux GUI

    I must convert a Windows GUI application to a Linux GUI application. Unfortunately, my Linux experience is almost nil.

    The converted app which is written entirely in Win32 C, must run on many different flavors of Linux from Redhat to Debian to Ubuntu.

    So, I'm looking for suggestions to make this conversion as painless and portable as possible. For instance, I'm aware that there are different Linux GUIs. But is there a common denominator GUI that I can develop to? In other words, I want to make the converted app portable to just about any variation of Linux.

    Also, a compiler recommendation would be greatly appreciated. I'm looking for a compiler comparable to MS Visual C++

  2. #2
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    g++ is the default compiler for most UNIX OSs. You cold try gtk(+), Qt or wxWindows for the GUI. These toolkits are available in most if not all GNU/Linux distros.

    Qt is free for Open Source apps, but gtk and wxWindows (or whatever it's called now) are under the LGPL which means you can link to them from a closed-source app.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Quote Originally Posted by -=SoKrA=-
    g++ is the default compiler for most UNIX OSs. You cold try gtk(+), Qt or wxWindows for the GUI. These toolkits are available in most if not all GNU/Linux distros.

    Qt is free for Open Source apps, but gtk and wxWindows (or whatever it's called now) are under the LGPL which means you can link to them from a closed-source app.
    Actually wxWidgets (changed from wxWindows due to threat from Microsoft I believe) has one minor difference in its license from lgpl, quoted below from their site
    The wxWindows Licence is essentially the L-GPL (Library General Public Licence), with an exception stating that derived works in binary form may be distributed on the user's own terms. This is a solution that satisfies those who wish to produce GPL'ed software using wxWidgets, and also those producing proprietary software.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  4. #4
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    Thanx for the info

    BTW, I was thinking about starting with Knoppix (Linux on a CD). Thus, I could keep my XP Pro OS but still boot up with Knoppix Linux until I get a dedicated Linux box. Can you recommend some other alternatives?

    Thanx again for the info..

  5. #5
    Just kidding.... fnoyan's Avatar
    Join Date
    Jun 2003
    Location
    Still in the egg
    Posts
    269
    hi

    On Linux platforms, gcc is the default compiler.

    For GTK+, the default language is C but there is a C+ wrapper for it (gtkmm - http://www.gtkmm.org/) . Qt uses C++ by default.

    I don't know weahter or not Qt programs can be compiled under windows but I compiled simple GTK+ applications under Windows with mingw which are originally written for Linux.

    There is a designer tool included in Dev-C++ for wxWidgets. I have never used it, but most probably it makes the GUI desing easier! - http://wxdsgn.sourceforge.net/

  6. #6
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    I don't think you need a dedicated box. Unless you want to of course, but with a dedicated hard-drive it's usually good enough. It's possible for them to share a hard-drive (which is what I do in laptops) but I wouldn't recomend it.

    Knoppix is a good way to test-drive GNU/Linux, and you can be fairly sure that if the hardware is supported under Knoppix, you won't have problems with any other distro.
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  7. #7
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    I was thinking about using the gcc compiler with wxWidgets on Knoppix Linux (on CD) as a starting point. Can anybody see any problems with this configuration as far as doing my port from Windows to Linux?

    Thanx for your help!!!!!!!!!

  8. #8
    xhi
    xhi is offline
    !anExpert
    Join Date
    Mar 2005
    Location
    pa
    Posts
    155
    >> Can you recommend some other alternatives?
    1 Get partition magic, or some other program that will modify partition table without hurting data.

    2 Using said partition program create a linux partition(or two or more, RTM) and a swap partition (partition magic will do all of this for you.

    3. Download a linux distro. I would recommend one of the following
    * Slackware // my vote is right here http://slackware.com
    * Debian
    * Fedora Core (latest)
    * Mandrake (Mandriva ... whatever)

    4. boot off the CD and go.. There are plenty of linux mboards to get you going to start, if you are a programmer you will love the linux environment, and you will never look back. I would recommend http://linuxquestions.org as a stop on your learning way.. Oh yeh, you will need to spare 2-5 gigs depending on distro and what you choose to install.

    >> but with a dedicated hard-drive it's usually good enough
    A sep hard drive is a good idea if possible when youre getting started, in case you make a meathead move and loose everything.

    ------

    Disclaimer :: This opinion is extremely biased.

  9. #9
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    Yep, you guys convinced me. It's a dedicated hard drive as opposed to another dedicated box. Especially, since I'm on a tight budget.

    Thanx for your help!

  10. #10
    Me -=SoKrA=-'s Avatar
    Join Date
    Oct 2002
    Location
    Europe
    Posts
    448
    >if you are a programmer you will love the linux environment, and you will never look back.

    I'll second that.

    >>> but with a dedicated hard-drive it's usually good enough
    >A sep hard drive is a good idea if possible when youre getting started, in case you make a >meathead move and loose everything.

    Not just when you're getting started, but I won't say how I got to this conclusion
    OK, so I should have paid more attention, stil...
    SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
    I say what I say, I mean what I mean.
    IDE: emacs + make + gcc and proud of it.

  11. #11
    Registered User
    Join Date
    Nov 2005
    Posts
    52
    I think wxWidgets is probably the best toolkit if you're familiar with Win32 GUI programming, as it has a similar philosophy/structure.

  12. #12
    Registered User
    Join Date
    Feb 2005
    Posts
    38
    Software development under Knoppix would not be fun. It's way too slow. You made the right choice dual booting.
    I like to play pocket pool.

  13. #13
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    I did download and try Knoppix on a CD. Knoppix does load rather slowly from a CD. So, Iwould assume as NoUse mentioned, application development really would NOT be fun.

    But now my main concern is setting up a dual boot option. I'm also prone to meatheaditis and I'm a little apprehensive about screwing up my primary Windows XP Pro OS. Anybody have any suggestions for setting up the dual boot option?

    Thanx

    Bob

  14. #14
    Registered User
    Join Date
    Feb 2005
    Posts
    38
    Use partition magic to partition out about 5gb from your main Windows partition. Make your main linux partition around 4gb (as that's all you will probably need as you're just doing some programming) and make it ext3. Then make a swap partition out of the 1gb of space that's left. Really any size would be fine depending on how much room you have to spare and how many packages you're planning on installing with the distro.
    I like to play pocket pool.

  15. #15
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    It's my understanding that Partition Magic is used for repartitioning one drive. What I want to do is add another drive which will have my Linux distro installed. In other words, I want to boot from the C drive for Windows XP and boot from the D drive for Linux. Will Partition Magic allow me to do this?

    Thanx

    Bob

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. stdio differences windows vs linux
    By keira in forum C Programming
    Replies: 6
    Last Post: 09-14-2008, 05:42 PM
  2. This works on linux...but why not windows?
    By Kinasz in forum C Programming
    Replies: 6
    Last Post: 12-29-2005, 04:50 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  4. Windows -> Linux
    By misplaced in forum C++ Programming
    Replies: 6
    Last Post: 12-19-2004, 11:27 AM
  5. linux gui
    By Klinerr1 in forum Linux Programming
    Replies: 10
    Last Post: 11-04-2002, 12:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21