Click to See Complete Forum and Search --> : Porting Visual C++ to Linux


Prishtina
09-04-2001, 11:02 AM
I have a pretty large application that is created in Visual C++ and I have to make it run on Linux. How do I go about doing that without paying 2500 $ for mainsoft (mainsoft.com) ?

optech
09-04-2001, 01:16 PM
well, i assume you know c++ if you have a program already written...
for the most part, the libraries are the same, and a lot of code can be instantly portable.
look up gcc on google or linuxdoc and try to compile it without any modifications...
if unseuccessful, debug your error msgs and pinpoint each cause (could there be a library function that you need? is it replacable with a linux lib?) until it works...

the other option is to re-write your app from the ground up, saving only specific snippets of code...

Prishtina
09-04-2001, 03:53 PM
Thanks for the reply
The problem that I have is how do you go about porting the visual aspects of a windows application, and also I have a microsoft Active X (Serial communications) in the app as well... If it was a straight C/C++ then gc c would take care of it,, but its a whole windows app,, apart from doing it from scratch do you know of any other way ?

Malakin
09-04-2001, 04:19 PM
This reminds me of a friend who started working on a project several years ago, I urged him to use opengl instead of DX. He eventually decided it was a good idea.

I also urged him to go out of his way to make sure everything was easily portable, he decided not to worry about it.

Now he's happy he at least used opengl since his employer has requested that he port the project over to Linux :)

IMHO It's always a good idea to use standards and to stay away from MS's proprietary tech, you never know what you're going to do with your code in the future.

TacKat
09-04-2001, 04:29 PM
If you didn't design it to be easily portable, you're out of luck. Break out the coffee because it's gonna be a long haul.

Windows API/MFC calls aren't going to be easily ported to Linux, and you can be pretty sure that any other microsoft code is not going to cooperate with Linux.

MattWil
09-04-2001, 06:27 PM
Well it looks as though you can download a 30 day trial from their site, does this not let you save? If it does I would just use that!

klamath
09-05-2001, 12:15 AM
Windows API/MFC calls aren't going to be easily ported to Linux

That's the whole point of WINE (in particular, winelib). Check out winelib @ www.winehq.com (http://www.winehq.com) -- it's been used to port a lot of big Windows apps to Linux/UNIX (Corel Wordperfect, Borland Kylix, etc).

jrbush82
09-05-2001, 01:20 AM
You may also check out qt designer from trolltech. It may be of some use. It is a multiplatform Visual C++ editor for Linux/Win/Solaris/HP-UX and more.

http://www.trolltech.com/qt/