473,763 Members | 7,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Couple of questions about compilers on linux

Hi
What is a good C/C++ compiler for a 64-bit linux system?
I'm thinking of building a new PC and want to put an AMD64 in it. Since
I've already got one windows PC, windows isn't free, and isn't even past
beta in 64-bit, I thought I'd go for a fedora linux box.

But I've no idea what compiler to use - presumably it'd be gcc, but which?
Do I need cygwin or anything if I'm on linux, or does gcc "just work" on
linux because it's its native environment?
Is it possible to compile a GUI app on 64-bit linux that will be (*fairly*
easily) portable to windows? (using C - not java)


Nov 14 '05 #1
4 2406
Bonj wrote:
Hi
What is a good C/C++ compiler for a 64-bit linux system?
I'm thinking of building a new PC and want to put an AMD64 in it. Since
I've already got one windows PC, windows isn't free, and isn't even past
beta in 64-bit, I thought I'd go for a fedora linux box.

But I've no idea what compiler to use - presumably it'd be gcc, but which?
Do I need cygwin or anything if I'm on linux, or does gcc "just work" on
linux because it's its native environment?
Is it possible to compile a GUI app on 64-bit linux that will be (*fairly*
easily) portable to windows? (using C - not java)


I am using debian 64 bits with gcc installed.
There are no problems at all with gcc, it works, and generates
64 bit code of course, in a 64 bit system.

Notice the sizeof(long) == 8, and sizeof(int) == 4. This is
not portable to windows 64 bits where sizeof(long) == 4 and
sizeof(int) == 4

I am porting lcc-win32 to linux, and I would love to tell you that
lcc64 is a better system but I will need some years of work
before it runs smoothly...

You do not of course need cygwin, since cygwin is a unix
emulator for windows. If you run unix natively, the simulator
just doesn't make any sense. Of course you could run an
Unix simulator using the windows emulation available under
unix, specially if you find that your new machine is just
too fast for your taste and you need to slow it down. :-)

Software ports easily in C, but you should beware of the
change in the long data type.

jacob

--
lcc-win32: http://www.cs.virginia.edu/~lcc-win32
Nov 14 '05 #2
Thanks
Do you know if the code to create GUI components in linux are totally
different to windows, or largely the same? e.g. does linux have
"CreateWind ow" et al. ?

Notice the sizeof(long) == 8, and sizeof(int) == 4. This is
not portable to windows 64 bits where sizeof(long) == 4 and
sizeof(int) == 4


That's even better! My existing machine is Win32, so porting to linux-64 I
can just use long...
Nov 14 '05 #3
Bonj wrote:
Thanks
Do you know if the code to create GUI components in linux are totally
different to windows, or largely the same? e.g. does linux have
"CreateWind ow" et al. ?

Notice the sizeof(long) == 8, and sizeof(int) == 4. This is
not portable to windows 64 bits where sizeof(long) == 4 and
sizeof(int) == 4


That's even better! My existing machine is Win32, so porting to linux-64 I
can just use long...


In unix/linux the windowing systems is separate and independent from the
operating system.
You can run unix/linux with NO gui.

The most common window system is X windows. Qt made by
http://www.trolltech.com/ can build the one gui application that runs on
both X Windows/Microsoft platforms.

(In fact X windows is just a user-space program like any other user program.
Its a very clean interface, unlike the mess that Microsoft created).

gtoomey
Nov 14 '05 #4
On Wed, 29 Dec 2004 12:28:23 +0000, jacob navia wrote:

....
Notice the sizeof(long) == 8, and sizeof(int) == 4. This is
not portable to windows 64 bits where sizeof(long) == 4 and
sizeof(int) == 4


It is portable as long as program code doesn't make invalid assumptions
about type sizes and ranges.

Lawrence
Nov 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
4373
by: Jatinder | last post by:
I 'm a professional looking for the job.In interview these questions were asked with some others which I answered.But some of them left unanswered.Plz help. Here are some questions on C/C++, OS internals? Q1 . What is the use of pointer to an array? Q2 . What is the use of array of pointers? Q3 . What is the use of pointer to function ? Q4 . How to print through serial port? What is Flow Control(Xon,Xoff) ?
30
3036
by: albert.neu | last post by:
Hello! What is a good compiler to use? (for MS Windows, for Linux) Any recommendations?? What's the point of having a C99 standard, if different compilers still produce differing results? The main reason for a standard, is (in my opinion) portabilty and
30
2291
by: GeorgeRXZ | last post by:
Hi Friends, I have some questions related to C Language. 1What is the difference between the standard C language and Non standard C language ? 2which is better C Lanugage, C under Linux/ Unix or C under windows/ DOS ?
2
1761
by: Hugh | last post by:
The PyGUI website specified this place as the place for general discussion about it, so here goes.... First off - thanks for something that is so straightforward to get running on OSX... I've been migrating some relatively straight-forward scripts-with-GUIs from Linux to OSX, and, while I used FLTK on Linux, I could not get pyfltk to install on OSX. PyGUI was so straightforward, though. Made me a very happy bunny. Fortunately, I wrote...
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.