The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Socket programming maracumbigo High Level Programming 4 02-11-2008 02:34 AM
Socket Programming arunviswanath High Level Programming 7 01-30-2007 03:18 PM
socket programming damn_bkb IP Networking 6 11-19-2006 02:10 AM
Need Help Regarding Socket Programming priya.vmr High Level Programming 1 11-06-2006 06:22 AM
Socket Programming joseph_shibu High Level Programming 1 11-05-2001 10:37 AM

Closed Thread
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
  #1 (permalink)  
Old 06-29-2004
soshell soshell is offline
Registered User
  
 

Join Date: Jun 2004
Location: Paris
Posts: 5
Socket Programming socket

Hello,

I actually try to make client-server program.
I'm using SCO OpenServer Release 5.0.0 and when I try to compile my code (by TELNET) I've got this error :
Quote:
Undefined first referenced
symbol in file
socket /usr/tmp/cca000Hf1.o
a.out: fatal error: Symbol referencing errors. No output written to a.out
I'm just using this simple code :
Quote:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdio.h>

#define ADDRESS "192.168.0.191"

char *strs[3] = {"Message test - Socket"};

main()
{
char c;
FILE *fp;
int fromlen;
register int i, s, ns, len;
struct sockaddr_un saun, fsaun;

if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
{
perror("server: socket");
exit(1);
}
exit(0);
}
and I get the same error if I use :
Quote:
gcc serv.c
or
cc serv.c
or
c++ serv.c
If someone can help me,
Thanks
  #2 (permalink)  
Old 06-29-2004
soshell soshell is offline
Registered User
  
 

Join Date: Jun 2004
Location: Paris
Posts: 5
I'm sorry....
I just search a bit more on the forum and I find something...

cc test.c -lsocket

and It works...

Last edited by soshell; 06-29-2004 at 07:51 AM..
  #3 (permalink)  
Old 06-29-2004
soshell soshell is offline
Registered User
  
 

Join Date: Jun 2004
Location: Paris
Posts: 5
Perhaps....I will need to send mail, send SMS, reboot computer (so using shell command), so I guess I will need a lot of librairies!

So thank you!!!
Closed Thread

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 09:09 PM.


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