Results 1 to 5 of 5

Thread: How can I compile in Linux what I have done in Windows (Visual Studio)

  1. #1
    Join Date
    Jun 2009
    Posts
    49

    How can I compile in Linux what I have done in Windows (Visual Studio)

    I am not a Linux expert and many of its things are new to me. This is the reason why I use Windows for my normal operation which might involve coding and then, if required, I experiment it on Linux. However, the problem here is that I am not able to compile, or might be I have not done it properly, in Linux. It was created in Visual Studio under Windows platform, and there the problem lies I suppose. I have Intel compiler and so I think the file created in Visual Studio should work in both the operating system. However I don't know how to get things work out. Please me in this matter !

  2. #2
    Join Date
    Nov 2008
    Posts
    1,185

    Re: How can I compile in Linux what I have done in Windows (Visual Studio)

    The only solution to your problem is Cygwin. It has a Linux-like environment for Windows and consists of two parts: a DLL (cygwin1.dll) to act as a Linux API emulation layer providing substantial Linux API functionality; and a collection of tools which provide Linux look and feel.

  3. #3
    Join Date
    Nov 2008
    Posts
    1,022

    Re: How can I compile in Linux what I have done in Windows (Visual Studio)

    There are 3 options to get this. Cgywin, Knoppix, or Vmware/Virtual PC. However, if you ask me personally which to go for, I think Cygwin is somewhat difficult to use and may not have all the Libs. And, thus, running linux on a partition along with windows is very much helpful.

  4. #4
    Join Date
    Nov 2008
    Posts
    1,054

    Re: How can I compile in Linux what I have done in Windows (Visual Studio)

    Although the compiler is the same (i.e. Intel), you will find a lot of differences between Windows and Linux when it comes to compiling. The two of them have difference in source and binary. For instance, you use __declspec on Windows* whereas you would use __attribute__ on Linux* for certain compiler extensions. The ABI will also differ in both the cases which allows the compiler to produce the result.

  5. #5
    Join Date
    May 2008
    Posts
    685

    Re: How can I compile in Linux what I have done in Windows (Visual Studio)

    Simply download the sources of Linux (the kernel, and not GNU/Linux, the whole system), glibc and GCC, get the headers of the kernel and glibc and save it on your system where your GCC can easily locate them, and then make GCC as a cross compiler. Later on with the help of this generate glibc. Thus you will be able to run your file on Windows and check if it can on Linux environment or not.

Similar Threads

  1. Replies: 5
    Last Post: 16-08-2011, 10:16 PM
  2. Replies: 2
    Last Post: 16-02-2011, 02:49 PM
  3. Can’t install Visual Studio 2008 on Windows 7
    By Pencil-Guy in forum Windows Software
    Replies: 4
    Last Post: 23-12-2010, 07:36 PM
  4. Compare Visual Studio 2010 and Visual Web Developer Express
    By Zacharia in forum Software Development
    Replies: 5
    Last Post: 28-01-2010, 04:27 AM
  5. Difference between Visual studio 2005 and Visual studio 2008
    By RohanS in forum Software Development
    Replies: 3
    Last Post: 12-06-2009, 10:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,652,856.12303 seconds with 16 queries