|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (7 bit)
|
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 |
|
|
|
|
|
#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. |
|
|
|
|
|
#3 |
|
Member (7 bit)
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|