473,324 Members | 2,473 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,324 software developers and data experts.

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 2382
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
"CreateWindow" 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
"CreateWindow" 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
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...
30
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? ...
30
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/...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: 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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.