Go Back   PCMech Forums > Linux Support > Linux OS and Software Assistance

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-28-2002, 02:51 PM   #1
Member (7 bit)
 
snow's Avatar
 
Join Date: Feb 2002
Location: Indianapolis, IN
Posts: 110
Send a message via AIM to snow
gcc on Linux

Hi, I'm a beginner programmer with limited exposure, and am trying to teach myself C and Java out of some of the those self-taught books. However, I'm having problems with the gcc compiler on Linux. I have installed all the appropriate packages (through Red Hat install), am able to get a version number with the "gcc -- version" command and make a header, but when I try to make a macro (beginner macro with no output, only a definition) I get errors saying things like "file doesn't exist" and there's another one, I just can't remember it offhand. The code is from a Linux programming book and follows below:

bash# gcc -D_GNU_SOURCE hello.c

I can give some more info such as software versions and the actual errors, but I don't have time to get that right now (I'm in a hurry). Thought I'd get this on here in case the answer just popped out at someone, and they were like "Oh, I probably know what this kid's problem is!" Thanx a lot, hope you can help.

snow
snow is offline   Reply With Quote
Old 02-28-2002, 04:23 PM   #2
Member (9 bit)
 
Join Date: Jan 2000
Location: Atwater Mn. USA
Posts: 429
If you are using a newer version, there is a problem with gcc. In their rush to get 7.0 out the door, they managed to include a broken version of gcc. They even included it in 7.1 after they were told by the maintainers that it was broken. The fix is to downgrade to the previous version.

Hope this points you in the right direction.

OOPS!
__________________
If you think you understand what's going on. Then you haven't been paying attention.
OOPS! is offline   Reply With Quote
Old 02-28-2002, 09:12 PM   #3
Member (7 bit)
 
snow's Avatar
 
Join Date: Feb 2002
Location: Indianapolis, IN
Posts: 110
Send a message via AIM to snow
Cool Thanx

Thanx so much that helps a ton! I had no idea, I bought Red Hat 7.1 cause it was on clearance for $13 and I don't have a cable modem to download linux. That explains everything. I'll check Red Hat's site, maybe they'll either have a patch or I can just get an older version. Hope it's not too large-- darn dial-up. (I'm a high school student with little income, so I can't afford broadband.) You guys are so great here!

snow
snow is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 03:20 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2