473,320 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Compile linux program under windows.

Hi,

Opening eclipse from windows operating system is it possible to create a project in c language and compile the program for linux and not for windows?If possible, can someone give me some guidance?

I didn't find the right solution from the internet.
Feb 24 '18 #1
2 1386
It is better to download a set of tools for compiling Linux programs by MinGW

IT support
Feb 24 '18 #2
weaknessforcats
9,208 Expert Mod 8TB
The short answer is no. Windows isn't Linux.

The longer answer is yes but you will need to "wrap" system libraries in such a way that when you build on Linux you use Linux libraries and when you build on Windows you use Windows libraries and your code uses neither but calls the library wrapper function you invented.

These things have already been done. Just select a library to use, pay money and off you go.

Read up on how to cross-compile.
Feb 24 '18 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tim Williams | last post by:
I'm using Python 2.3.2 and tkFileDialog in a program I have. I'm trying to use this on Linux (RH 8.0) and Windows 2000. When I first upgraded from v2.2 to v2.3. I noticed that...
1
by: John | last post by:
I'm trying to write a program that's run on both Windows 98 and Linux. I need a timer, that I can start and when it hits a limit, it needs to call a callback function. I also need to be able to...
3
by: xrule | last post by:
I received a file .c from a friend and he told me that I could compile with linux for with windows using gcc. Where can I find a c. complier (gcc) for windows. newbie,
2
by: Andrej Litowka | last post by:
Hi All! If anybody know, how I cann set an enviroment variable (with ANSI C) on Windows similar like on Linux. I tried setenv, but the function doesn't work correct on Windows - it sets env....
4
by: Davy | last post by:
Hi all, I am reading a book "Computer Systems A progammer's Perspective"( http://csapp.cs.cmu.edu/public/students.html ). The book have a chapter talking about Memory and have a sample program(...
2
by: Oliver Bleckmann | last post by:
Short question: I want my source to compile - without changes - on both linux and windows, so what libs can i use for 'independent' gui programming? does a gtk based progam compile on linux?...
4
by: fatihbilmuh | last post by:
I code a program which two computer communicate each other with serial port in cross platform but my program dont run cross platform but run linux to linux or windows to windows . I think my serial...
10
by: Nicholas Zhou | last post by:
Sorry if this sounds stupid. I am a total newbie.... Can I compile C program in Visual Studio 2005 IDE? I wrote the simple "Hello World" program in it: ------------------------------------ ...
21
by: Johs | last post by:
Are there any difference between writting C++ in linux or Windows? I was told that it was only a matter of available IDE's (eclipse for both platforms, but only Visual Studio for Windows) but are...
2
myusernotyours
by: myusernotyours | last post by:
Hi there all, I have been contracted to write an application that can run on linux or windows, I have heard that Java is platform indepedent but am wondering whether if i use java and my windows os...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.