The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
thread context switches: detection, prevention fabulous2 UNIX for Advanced & Expert Users 2 03-23-2008 11:35 AM
xterm switches to make fonts larger kanejm UNIX for Advanced & Expert Users 1 03-08-2007 12:53 PM
C/C++ compiler ver 6 on AIX 5.3 - errors satguyz AIX 2 04-01-2006 02:17 AM
Tar switches!!! nikk UNIX for Advanced & Expert Users 1 10-25-2004 06:33 PM
problem w/ -z && -n switches in an if statment Optimus_P Shell Programming and Scripting 1 07-31-2002 11:22 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-25-2003
Ahsan Ahsan is offline
Registered User
  
 

Join Date: Aug 2003
Location: Australia
Posts: 9
Question gcc Compiler Switches: giving Illogical Errors

Hi,
Has anyone used gcc compiler and know alot about it? I am compiling a file with:
gcc -o xyz xyz.c abc.o -lsocket -lnsl
it compiles pretty fine.

But whe I use switches
gcc -o -Wall -pedantic -ansi xyz xyz.c abc.o -lsocket -lnsl
it starts giving illogical, rather I should say stupid errors.

Example:
int up_time; // ofcourse, up time of client
On this line it gives error: parse error before '/' token

Example2:
struct sockaddr_in servaddr;
....
....
bzero(servaddr,sizeof(servaddr));

it gives error on second of the above lines:
'servaddr' undeclared (first use in this function)


Any idea what can be the reason?
 

Bookmarks

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:26 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0