Thread: Porting C++ Application from Linux(g++) to Visual Studio 2003

  1. #1
    Registered User
    Join Date
    Oct 2005

    Porting C++ Application from Linux(g++) to Visual Studio 2003

    Hello all,

    I'm a newbie to this group. I'm currently working on a project where the task is to port an entire C++ application from Linux (g++) to Windows Xp (Visual Studio 2003).

    I'm looking for tips regarding how I should start doing this. What would be the major changes that I would need to make? Any tips would be hugely welcome.

    I'm also new Visual Studio Environment. So it would be great if anyone could suggest how I should start proceeding with it.


  2. #2
    Registered User
    Join Date
    Aug 2005
    it all depends on the program -- is it GUI or console? if GUI using X11, it will be a major rewrite. The differences between the two compilers are not so much c++ language as it is os-specific tasks, such as spawning threads and other processes, directory searching, location of files, sockets, printers, and other hardware related issues.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Are you planning a one-way trip or are you planning on maintaining both platforms into the future?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Oct 2005
    Hi all,

    Thanks for the reply. It's console based. I want to maintain the project in both sets of platforms.

    It's an application project, not a system level project. The code doesn't have any OS specific tasks, except of course location of files and directories.

    I have a couple of questions.

    1. The application runs perfectly fine in unix now. Essentially there are around 25 .cpp files and the Makefile contains all info. about the dependencies and how they should be run. There is also a config directory that contains a set of config files used by the application?
    My question is how should I go about porting this in VC++. Specifically How should I configure the dependencies like in the Makefile. Also How do I go about using the config files? I'm new to .NET IDE and hence I need some guidance regarding this.

    2. Also for the above project, what sort of VC++ template should I use? Should it be Win32 Console Project? I'm totally lost as I have worked only in unix environment before for c++ programming. kindly help me out.

    3. I also want to maintain the project in both platforms.

    looking for some tips. Also suggest me some good book for learning about .NET IDE and VC++.

    Last edited by kingsree; 10-09-2005 at 04:09 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 12:17 AM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  3. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  4. Stupid compiler errors
    By ChrisEacrett in forum C++ Programming
    Replies: 9
    Last Post: 11-30-2003, 05:44 PM
  5. header file bringing errors?
    By bluehead in forum Windows Programming
    Replies: 4
    Last Post: 08-19-2003, 12:51 PM