Click to See Complete Forum and Search --> : Porting from VC++ : MFC Support on Linux


a_mlt1
06-25-2004, 12:30 AM
Hi Guys,

I am working on Porting from VC++ (version 6) to Kdevelop in Linux.

The source code has several of the inbuilt constructs of MFC.

eg:

Some of the classes are declared of type - CList, CObject.

Just a small information about the CObject class:



CObject is the principal base class for the Microsoft Foundation Class Library. It serves as the root not only for library classes such as CFile and CObList, but also for the classes that you write. CObject provides basic services, including

Serialization support
Run-time class information
Object diagnostic output
Compatibility with collection classes

Note that CObject does not support multiple inheritance. Your derived classes can have only one CObject base class, and that CObject must be leftmost in the hierarchy. It is permissible, however, to have structures and non-CObject-derived classes in right-hand multiple-inheritance branches.



Clist class inherits from CObject Class.

ow can the usage of such classes be replaced in the source Code.

Eg: Clist* abc;

What should be done to make this statement working in Linux.

Can any one suggest me on this issue.


Cheers
a_mlt1

a_mlt1
06-25-2004, 07:53 AM
Hi All,

Just to clarify u all more:

is there Non-MFC Implementation available for CList, CObject Classes, as they r available for CString Class.

Regards,
a_mlt1

jim mcnamara
06-25-2004, 11:24 AM
There are MFC libraries for Unix boxes. It sounds like you have one.

Believe it or not Microsoft has some information on porting MFC apps to Unix.


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_write_code_that_works_on_the_largest_number_ of_platforms.asp

bwkaz
06-25-2004, 07:55 PM
Or, you could just use STL instead, since it comes standard with every decent C++ compiler.

Instead of CList, try std::vector<whatever type you want it to store> or std::list<whatever type you want it to store>. Or, if you don't need it to be doubly linked, try std::slist<whatever type you want it to store>.

Of course, you'll need a good STL reference. Try http://www.sgi.com/tech/stl/