Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about converting windows C++ to *nix C++

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
0
0
US
This question comes from a non-c(++) programmer. We have a program written in Borland CPP circa 1995 under Windows 3.1 and believe it or not it is still in production. We have the program .h files and the .cpp source but it uses many libraries, some of which are no longer available (i.e.: owls).

The binary of this program does NOT execute under Windows XP. So we're faced with a decision to come up with some options. So far we've arrived at three scenarios.
1) locate a replacement program (would require another vendor which is not a good move).
2) purchase an up to date cpp compile suite for Windows XP and try to modify the code and locate alternatives for the missing libraries.
3) abandon windows altogether and convert the code and its GUI to a Linux based platform (which is the desired choice).

My question from those of you who might know is this:

What would be required to migrate the code to Linux? As we are NOT cpp windows programmers is there any freeware/commercial source converters that would at least identify the necessary changes/alterations? Is is conceivable that the cpp, in general, would port relatively easily to the Linux cpp? And how about the same for the Borland/Windows GUI functions and calls?

Any ideas and advice will be greatly appreciated as I/we are not qualified to make these determinations ourselves.

Thanks in advance.

Bob
 
The migration of code might not be as needed as you think. There is the option of testing it to see if it will run under WINE or LINDOWS... Then you'd have something to do the work, while you convert the code to a higher Windows platform or to *nix.

As for which way to go, and tools to do, I don't have any suggestions except where to begin your search.
 
Borland has IDE named Kylix 3 for Linux, wich is compatible with C++ Builder for Win32. I have never tryed it, but it should be the nearest thing to BC++ 3.0.
Anyway, I don't believe, there might be a possibility for such a migration without any reprogramming of GUI.
Following to jstreich's advice, the 4-th solution of your problem may be using of some emulator under Linux or Win32 to run your original Win16 code (if you dont need any additional functionality, of course). For example, Wmware (at least v2.0) is good PC emulator, wich should allow to have a whole Windows 3.11 machine as a separate process window under Linux (or under Win32 as well).
 
Thanks gentlemen. Both ideas are great and I will investigate/evaluate both.
 
Bob,
Did you make decision what to do yet? If not, my suguestion is
to upgrade your compiler to BC++ 4.1 16 bits. The compiler will
work on Win98 only but the run time will continue work for W2K
and XP. It is a coincidence that I have the same situation.
The existing App was writen in BC++ 4.1. and I might port the App to Microsoft C++. I believe the cost will be rewrite the
GUI using Microsoft C++.
 
If I were you, I would remove all the necessary logic (the meat) and build a C++ library (DLL). This would give you two options...

1) Write a C# UI wrapper which pinvokes the DLL, utilizing it's logic.

2) Cross compile the Cpp library on Linux, write a UI wrapper there on that platform.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top