C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Ziff Davis Enterprise Virtual Tradeshows: Hot Topics, Cutting Edge Technology, Real-time Interaction with IT Professionals. Learn more at ziffdavisvts.com
  #1  
Old January 30th, 2002, 07:56 PM
nobodycares_01 nobodycares_01 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Posts: 0 nobodycares_01 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question about Compilers

I have a different kind of question. I was wondering if there is a compiler that will compile C/C++ programs that run on Windows and Unix/Linux?

Thanks,
Jonathan Donaghe
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #2  
Old January 30th, 2002, 08:58 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
I have never used the following product so I can't tell you anything about it:

http://www.mainsoft.com/products/mainwin.html

Reply With Quote
  #3  
Old January 30th, 2002, 08:58 PM
jonsagara's Avatar
jonsagara jonsagara is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: USA
Posts: 286 jonsagara User rank is Private First Class (20 - 50 Reputation Level)jonsagara User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 m 23 sec
Reputation Power: 7
The GNU compiler is available for both platforms. If you're asking whether you can compile a program on Windows and have it run on *nix, then no. The executable formats aren't compatible.*

* This isn't entirely true - you could get a cross compiler, but you'd still have to compile two different versions - one for Windows, one for *nix. You're better off just compiling on the intended platform.

EDIT: See the above post.
Comments on this post
Gran Roguismo agrees!
__________________
Jon Sagara

"Me fail English? That's unpossible!"

Reply With Quote
  #4  
Old January 31st, 2002, 08:19 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,827 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 22 h 57 m 29 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
You can write a C/C++ program for both system types by the use of include directives to define which sections should be included in on windoze systems and *nix systems.
The link that jonsagara listed for the gnu compiler is what you are looking for, you can get it integrated also if you get the cygwin environment (plus some excellent unix commands).
Also, as jon said, you can't compile it on one system and that executable run on the other, they are incompatable in that aspect. You have to compile the source code on the os type you wish to run it on. The other problem, especially if you are writting window style applications, they will not port over at all, unless you use something like the wxWindows library to build the program, which will port to either system, but you still have to compile it on the system you want to run it on.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Question about Compilers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway