Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



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

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 22-09-2010
Member
 
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 !

Reply With Quote
  #2  
Old 22-09-2010
Member
 
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.
Reply With Quote
  #3  
Old 22-09-2010
Member
 
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.
Reply With Quote
  #4  
Old 22-09-2010
Member
 
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.
Reply With Quote
  #5  
Old 22-09-2010
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How can I compile in Linux what I have done in Windows (Visual Studio)"
Thread Thread Starter Forum Replies Last Post
Install IVF Pro 11.1.051 with Visual Studio Pro 2008 on Windows XP Kiran25 Windows Software 5 16-08-2011 10:16 PM
Visual Studio 2010: features and changes compared to Visual Studio 2008 BinDs14 Guides & Tutorials 2 16-02-2011 01:49 PM
Canít install Visual Studio 2008 on Windows 7 Pencil-Guy Windows Software 4 23-12-2010 06:36 PM
Compare Visual Studio 2010 and Visual Web Developer Express Zacharia Software Development 5 28-01-2010 03:27 AM
Difference between Visual studio 2005 and Visual studio 2008 RohanS Software Development 3 12-06-2009 10:48 AM


All times are GMT +5.5. The time now is 11:57 PM.