| | |
unresolved external symbol "a whole bunch of em"
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hey everyone, I'm working on my first program using "Winsock2.h".
I'm getting back linker errors "error LNK2001: unresolved external symbol ..."
9 unresolved externals total
The program came from an MSDN tutorial: "A simple winsock program", its a simple ping program that sends packets to a loopback address.
when I include winsock2.h I use
I'm sure its got something to do with define, but I've never worked with that in my programs before. If someone can point me to a tutorial, I'd be very happy. Thanks for viewing.
I'm getting back linker errors "error LNK2001: unresolved external symbol ..."
9 unresolved externals total
The program came from an MSDN tutorial: "A simple winsock program", its a simple ping program that sends packets to a loopback address.
when I include winsock2.h I use
C Syntax (Toggle Plain Text)
#include <stdio.h> // for printf #include "winsock2.h"
I'm sure its got something to do with define, but I've never worked with that in my programs before. If someone can point me to a tutorial, I'd be very happy. Thanks for viewing.
If in doubt, reach into the trash can and remove the user guide.
I googled for how to link a library and haven't found anything yet.
I'm using Visual Studio .NET for my C++ compiler. Some webpages that google turned up say that you can go into "Project" --> "Settings" --> "Linker" but there isn't a tab for settings under "Project". I guess thats a 6.0 thing and not a .NET thing.
I will be searching and google'n some more on how to link. I will also be checking up on here every now and then if you, Narue, have any info on how to link using .NET. Thanks for the help.
I'm using Visual Studio .NET for my C++ compiler. Some webpages that google turned up say that you can go into "Project" --> "Settings" --> "Linker" but there isn't a tab for settings under "Project". I guess thats a 6.0 thing and not a .NET thing.
I will be searching and google'n some more on how to link. I will also be checking up on here every now and then if you, Narue, have any info on how to link using .NET. Thanks for the help.
Last edited by Geek-Master; Mar 24th, 2005 at 1:56 pm. Reason: it needed something more ^^
If in doubt, reach into the trash can and remove the user guide.
I searched on how to link Wsock32.LIB and found out how.
I just typed in that little line and bam... everything a...o...k.
C Syntax (Toggle Plain Text)
#include <stdio.h> // for printf #include "winsock2.h" #pragma comment( lib, "wsock32.lib" ) // This will link to wsock32.lib void main() { // Winsock stuff }
I just typed in that little line and bam... everything a...o...k.
If in doubt, reach into the trash can and remove the user guide.
![]() |
Similar Threads
- Need help with "error LNK2001 unresolved external symbol" (C++)
- error LNK2001: unresolved external symbol (C++)
- error LNK2001: unresolved external symbol (C++)
- unresolved external symbol when using a hashtable class (C++)
- error LNK2001: unresolved external symbol (C++)
Other Threads in the C Forum
- Previous Thread: matrices
- Next Thread: searching and inserting node in a binary search tree
Views: 20647 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char convert copyanyfile copypdffile cprogramme createcopyoffile createprocess() csyntax directory drawing dynamic executable fflush file floatingpointvalidation fork frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o ide inches infiniteloop initialization interest kilometer lazy linked linkedlist linux linuxsegmentationfault list logical_drives match matrix meter microsoft motherboard multi mysql open opendocumentformat openwebfoundation pattern pause pdf pointer pointers posix power problem program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling segmentationfault send shape single socketprograming socketprogramming spoonfeeding stack standard strchr string strings structures student suggestions system test testautomation unix urboc user voidmain() win32 win32api windows.h






