LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-25-2004, 09:24 AM   #1
Moons
LQ Newbie
 
Registered: May 2004
Posts: 5

Rep: Reputation: 0
Question Porting c++ code to linux


Hi,

I am trying to port an application written in C++ to a Linux system. It is the first time I am looking at this problem so I do not know where to start! The program is a main menu (like Start in windows). I have the source code for the program but I need to port it to Linux. What should I look at to make changes?

Thanks.
 
Old 05-25-2004, 01:28 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

No easy answer to this question - "It depends".

I'd suggest there are (at least) three different levels you need to look at:

Code:
     +------------------+
     |   C++ syntax   |  <= POTENTIALLY STRAIGHTFORWARD
     +------------------+
     | OS/library APIs|  <= POTENTALLY STRAIGHTFORWARD
     +------------------+
     | User interface |  <= POTENTIALLY VERY, VERY DIFFICULT
     +------------------+
I'd suggest the following:

1. Baseline the code you need to port:
a) Count the #/modules and the #/lines of code in your Windows app

2. GCC/MS C++ syntax:
a) Do a test compile of a few representative modules
b) Count the #/compile errors; count #/compile warnings
<= THIS MIGHT GIVE YOU A "BALLPARK" FOR HOW PORTABLY
THE CODE IS WRITTEN
c) Extrapolate the effort

3. User interface:
a) Do a Google search for different Open Source UIs.

It runs the gamut from Qt (roughly analogous to MFC) through Tcl/Tk
(roughly analogous to VB) through Java/Swing (which would have
the added benefit of continuing to run on Windows after you port it).

Don't forget to consider making the user interface a web interface
(potentially the easiest, most robust solution of all).

b) Make a rough prototype in one or more of your "candidate UIs".

c) Extrapolate the porting effort
<= THE EFFORT WILL BE IN DIRECT PROPORTION TO HOW
WELL DESIGNED THE APP IS: TO WHAT EXTENT IT SEPARATES
UI FROM FUNCTIONALITY ... AND TO WHAT EXTENT IT JUMBLES
THE TWO TOGETHER...

Good luck .. PSM
 
Old 05-25-2004, 01:51 PM   #3
Moons
LQ Newbie
 
Registered: May 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Wink

Thanks a lot,

I think it's enough to start me up...I have to first try to run it on the Linux compiler to see what works or not
 
Old 06-03-2004, 01:24 AM   #4
dima_l
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Question creating Makefile

Hi!

I need to port a large project from MVSC to Linux. Does anybody know some utilities to create Makefile for Linux from Visual Studio project file? (Assuming that the source code is portable)

Thanks a lot
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Porting C++ code from XP to Linux Bondfire Programming 7 08-12-2004 03:42 PM
Porting C++ code from windows to Linux ashwinipahuja Programming 9 06-03-2004 02:09 AM
Porting C++ code from windows to Linux ashwinipahuja Linux - General 1 03-22-2004 02:57 AM
porting a C++ code to redhat Linux environment KevinG Programming 12 01-02-2004 03:55 PM
porting windows ce code to linux rainmann Programming 7 06-12-2003 07:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration