LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-03-2005, 01:50 AM   #1
chanwing
Member
 
Registered: Feb 2005
Posts: 42

Rep: Reputation: 15
newbie: Linux programming for C++


I am a newbie for Linux programming
Sorry that I don't know whether I post this message on the Newbie topic or Programming topic.
I have a problem about Linux programming for C++.
In fact, I have a project about changing a Visual C++ 6.0 program in Window into a linux version to run in Linux.
However, there are about 300files and about at least 50000 code lines.
The program is using the MFC to write.
Then how can I convert it into the Linux program?
am I only changing the GUI coding?
because there are some threads using, am I need to change the coding also?
eg. <pthread.h> coding changing...
Also, I need to call the library by driver.
is it so different for the shared library compared to Window?
And, What linux development tools can I use for my project?
Actually, I am just a Linux administrative Level and it is all new about linux programming.
Can anyone help me?
Thanks for your attention
I would be grateful if anyone can help me.
thx lots
 
Old 02-03-2005, 02:19 AM   #2
sasho
Member
 
Registered: Jan 2005
Distribution: Arch
Posts: 120

Rep: Reputation: 17
Quote:
However, there are about 300files and about at least 50000 code lines.
The program is using the MFC to write.
I'd say you're in deep $*it.
 
Old 02-03-2005, 02:23 AM   #3
chanwing
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15
???
what do you mean?
In fact, it is my Final Year Project (FYP) in my University.
It is no cost about it.
 
Old 02-03-2005, 03:25 AM   #4
sasho
Member
 
Registered: Jan 2005
Distribution: Arch
Posts: 120

Rep: Reputation: 17
I mean that the project size is enormous.
Do the math--let's say you end up writing 100 lines working code a day (consider this an exceptionally good day). That makes 500 days of coding. never mind things like debugging, studying new windowing toolkit, unit testing, etc... Figuring out C++ will slow you down a bit, also the fact that you have to port it from MFC...

Pick something more manageable, that fits in your time table.
 
Old 02-03-2005, 06:59 PM   #5
chanwing
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15

Yes, I also think that.
thx for your reply and advance.
However, my project is not just like this.
It includes other tasks that I need to handle.
 
Old 02-03-2005, 08:20 PM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Re: newbie: Linux programming for C++

Quote:
Excerpts from the original post by chanwing
I am a newbie for Linux programming
I have a problem about Linux programming for C++.
In fact, I have a project about changing a Visual C++ 6.0 program in Window into a linux version to run in Linux.
However, there are about 300files and about at least 50000 code lines.
The program is using the MFC to write.
Then how can I convert it into the Linux program?
Actually, I am just a Linux administrative Level and it is all new about linux programming.
I am not sure exactly what your relationship is with the original Windows project. Is this a project that you have written in Windows, so that you already know it very well?

Or (as I fear) is this something that someone else has written for Windows, and you have to port it to Linux? And how familiar are you with programming at all? I took that last line of yours to mean that you are a server administrator and not a programmer.

If you are just learning programming, I fear that this is way beyond you. Figuring out all the differences between Windows and Linux implementations of C++ would be a daunting enough task, especially given this project's sheer size. To have to learn the code as well makes this absolutley impossible for a one-year project.
 
Old 02-03-2005, 08:58 PM   #7
chanwing
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Really Thanks for zaichik and Sasho reply.

In fact, in my FYP project, I need to modify the window version program with Visual C++ 6.0 into Linux version program. However, the window program is not written by me. So, I need to analysis the main program first. For me, I am good at C and Java. And, I learned C# and asembly langauge. But, I am not so strong enough on C++. What is more, I need to develop a new algorithm to improve the program. (target of project: modification and development)

Up to now, I know that I need to change the GUI from MFC into non-MFC GUI. Also, I need to change some API eg. thread, semophare, database modules and so forth. is it difficult to change the MFC GUI?in fact, there are lots of dialogs in the program.

I really wanna know that am I possible to finish it within 9 months? can any experts answer my question and give me some suggestions?

I have already seen and got some ideas from some Linux books, for example, Beginning Linux Programming, Advanced Linux Programming and Linux Programming Unleashed. However, I still don't know how to make a shared library. Can anyone help me?

Also, Can I ask you about the Linux development tools for C++ programming?
I want to decide one of them for my project:
1. Kylix
2. Qt
3. Kdeveloper
4. Borland C++ builder X
which one is better?
because I can find the books for the tool is only Qt and the other tools I can't find books for reference. is it better that I choose Qt? Or, I choose the most common one of Kylix?

SORRY that I have so many questions for my project but I really need yours help. Linux programming is really new and difficult for me.
Please help me.
Thx for any nice reply.
And,
Thx for your kind attention.
 
Old 02-04-2005, 02:25 AM   #8
sasho
Member
 
Registered: Jan 2005
Distribution: Arch
Posts: 120

Rep: Reputation: 17
Quote:
I really wanna know that am I possible to finish it within 9 months? can any experts answer my question and give me some suggestions?
Say, is it possible to pick a subset of your MFC program, a portion that you find important and in need of improvement? Something (in terms of size) no more that 4-5 thousand lines? Although previous comments might seem a bit harsh, its better to get the straight dope now, rather than set yourself up for failure.

Quote:
For me, I am good at C and Java. And, I learned C# and asembly langauge. But, I am not so strong enough on C++.
With your experience picking up C++ won't be a problem. You will need time to figure out things, that's all. Things like how to use the STL, for example.

Quote:
Up to now, I know that I need to change the GUI from MFC into non-MFC GUI. Also, I need to change some API eg. thread, semophare, database modules and so forth. is it difficult to change the MFC GUI?in fact, there are lots of dialogs in the program.
MFC is another factor that will eat up a lot of time. It's a bear to learn, it's clunky and what an ugly way to program. This fact alone would make me rethink the whole project.

I am only familiar with Qt and Kdevelop. You will find that Qt has the same capabilities as far as dialogs, etc. But much easier to program than MFC. Other windowing tookits--Tcl/tk looks easy enough to uderstand, as well as the GTK.

And you will find that using threads and semaphores in Linux is straightforward. Database usage is about as identical as if you did it in Windows.

You biggest problems here are the very big size of this project, as well as the enormous number of MFC dialogs that it has.

Quote:
However, my project is not just like this.
It includes other tasks that I need to handle.
You are saying that is even more complex than being assessed. Therefore, look to reduce (greatly) the scope of this project, not to expand it. Reduce it tenfold. Otherwise, it is not doable in your time frame. Seriously.
 
Old 02-06-2005, 08:26 PM   #9
chanwing
Member
 
Registered: Feb 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Thank you sasho's reply in detail
Thanks for your kind attention and nice reply.
Your reply is great help for me
I know more clear about my project
thx lots

 
  


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
Total Linux Programming Newbie binarybob0001 Programming 4 04-01-2005 03:12 PM
Newbie: Linux programming for C++ chanwing Linux - Newbie 3 02-03-2005 02:04 PM
Newbie Linux Programming Help Nodin Programming 10 04-20-2004 08:46 PM
Linux and programming newbie Smoo Programming 7 02-04-2004 10:07 AM
Newbie desperate about how to start Linux programming in C sanki_man Programming 5 08-11-2003 05:51 AM

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

All times are GMT -5. The time now is 02:33 AM.

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