Compiler: Default compiler
Building Makefile: "F:\DEV-CppPortable\App\devcpp\Makefile.win"
Executing make...
make.exe -f "F:\DEV-CppPortable\App\devcpp\Makefile.win" all
gcc.exe client.server.o -o "Project1.exe" -L"F:/DEV-CppPortable/App/devcpp/lib" -lwsock32 -lobjc
F:\DEV-CppPortable\App\devcpp\Bin\..\lib\gcc\mingw32\3.4. 2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lobjc
collect2: ld returned 1 exit status
make.exe: *** [Project1.exe] Error 1
Execution terminated
what is -lobjc ??how to solve it?
my fail
Code:
#include <stdio.h>
#include <windows.h> /* These are the usual header files */
//#include <winsock.h>
#include <winsock2.h>
//#include <winsock32.h>
#define PORT 3550 /* Port that will be opened */
#define BACKLOG 2 /* Number of allowed connections */
main()
{
int fd, fd2; /* file descriptors */
struct sockaddr_in server; /* server's address information */
struct sockaddr_in client; /* client's address information */
int sin_size;
if ((fd=socket(AF_INET, SOCK_STREAM, 0)) == -1 ){ /* calls socket() */
printf("socket() error\n");
exit(-1);
}
server.sin_family = AF_INET;
server.sin_port = htons(PORT);
server.sin_addr.s_addr = INADDR_ANY; /* INADDR_ANY puts your IP address automatically */
bzero(&(server.sin_zero),8); /* zero the rest of the structure */
if(bind(fd,(struct sockaddr*)&server,sizeof(struct sockaddr))==-1){ /* calls bind() */
printf("bind() error\n");
exit(-1);
}
if(listen(fd,BACKLOG) == -1){ /* calls listen() */
printf("listen() error\n");
exit(-1);
}
while(1){
sin_size=sizeof(struct sockaddr_in);
if ((fd2 = accept(fd,(struct sockaddr *)&client,&sin_size))==-1){ /* calls accept() */
printf("accept() error\n");
exit(-1);
}
printf("You got a connection from %s\n",inet_ntoa(client.sin_addr) ); /* prints client's IP */
send(fd2,"Welcome to my server.\n",22,0); /* send to the client welcome message */
close(fd2); /* close fd2 */
}
}
http://img148.imageshack.us/img148/2...ing1iu9.th.jpg
http://img139.imageshack.us/img139/8...ing2fy4.th.jpg
please help me....