•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C section within the Software Development category of DaniWeb, a massive community of 456,609 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,469 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C advertiser: Programming Forums
Views: 4309 | Replies: 0
![]() |
•
•
Join Date: Aug 2004
Posts: 76
Reputation:
Rep Power: 5
Solved Threads: 0
Hi everyone,
First of all thank you very much for all the help that you have been providing me. Unfortunately, i am hist with another bug. This time, i am havinh problems linking OBJ files that uses the following:
#include <stdio.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32")
When i link them, i get the following errors:
C:\lcc\bin>lcclnk wgate.obj
wgate.obj .text: undefined reference to '_socket@12'
wgate.obj .text: undefined reference to '_send@16'
wgate.obj .text: undefined reference to '_recv@16'
wgate.obj .text: undefined reference to '_WSAGetLastError@0'
wgate.obj .text: undefined reference to '_htons@4'
wgate.obj .text: undefined reference to '_inet_addr@4'
wgate.obj .text: undefined reference to '_gethostbyname@4'
wgate.obj .text: undefined reference to '_connect@12'
wgate.obj .text: undefined reference to '_WSAStartup@8'
wgate.obj .text: undefined reference to '_WSACleanup@0'
N.B: I use the LCC compiler and linker on windowsXP.
First of all thank you very much for all the help that you have been providing me. Unfortunately, i am hist with another bug. This time, i am havinh problems linking OBJ files that uses the following:
#include <stdio.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32")
When i link them, i get the following errors:
C:\lcc\bin>lcclnk wgate.obj
wgate.obj .text: undefined reference to '_socket@12'
wgate.obj .text: undefined reference to '_send@16'
wgate.obj .text: undefined reference to '_recv@16'
wgate.obj .text: undefined reference to '_WSAGetLastError@0'
wgate.obj .text: undefined reference to '_htons@4'
wgate.obj .text: undefined reference to '_inet_addr@4'
wgate.obj .text: undefined reference to '_gethostbyname@4'
wgate.obj .text: undefined reference to '_connect@12'
wgate.obj .text: undefined reference to '_WSAStartup@8'
wgate.obj .text: undefined reference to '_WSACleanup@0'
N.B: I use the LCC compiler and linker on windowsXP.
![]() |
•
•
•
•
•
•
•
•
DaniWeb C Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- ABIT IC7 G "CMOS Checksum error" and "CPU has been changed or is unworkable" (Windows NT / 2000 / XP / 2003)
- "already defined" error (C++)
- google "keyword" question (Search Engine Optimization)
- "The Sims" visual C++ runtime error, what shall i do? (Windows Software)
- "Run time error, do you wish to debug?" (Web Browsers)
Other Threads in the C Forum
- Previous Thread: C program doubts
- Next Thread: passing arrays,reference and value parameters


Linear Mode