Connecting Tech Pros Worldwide Forums | Help | Site Map

error LNK2001: unresolved external symbol

ozgan.net
Guest
 
Posts: n/a
#1: Jul 22 '05
Hi everyone,

I created my first COM object, but I took below errors. Why I didn't use
socket functions. I defined *.def file

__imp__WSAStartup@8 PRIVATE
__imp__socket@12 PRIVATE
__imp__htons@4 PRIVATE
__imp__connect@12 PRIVATE
__imp__recv@16 PRIVATE
__imp__closesocket@4 PRIVATE
__imp__send@16 PRIVATE
__imp__gethostbyname@4 PRIVATE

Please help me. Thank you.
(Note: I little speak english. So I'm sorry)


Linking...
Creating library Debug/test.lib and object Debug/test.exp
Request.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4
Request.obj : error LNK2001: unresolved external symbol __imp__send@16
Request.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
Request.obj : error LNK2001: unresolved external symbol __imp__recv@16
Request.obj : error LNK2001: unresolved external symbol __imp__connect@12
Request.obj : error LNK2001: unresolved external symbol __imp__htons@4
Request.obj : error LNK2001: unresolved external symbol __imp__socket@12
Request.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
Debug/test.dll : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.

test.dll - 9 error(s), 0 warning(s)

Gottfried Eibner
Guest
 
Posts: n/a
#2: Jul 22 '05

re: error LNK2001: unresolved external symbol


> Linking...[color=blue]
> Creating library Debug/test.lib and object Debug/test.exp
> Request.obj : error LNK2001: unresolved external symbol
> __imp__gethostbyname@4 Request.obj : error LNK2001: unresolved external
> symbol __imp__send@16 Request.obj : error LNK2001: unresolved external
> symbol __imp__closesocket@4 Request.obj : error LNK2001: unresolved
> external symbol __imp__recv@16 Request.obj : error LNK2001: unresolved
> external symbol __imp__connect@12 Request.obj : error LNK2001: unresolved
> external symbol __imp__htons@4 Request.obj : error LNK2001: unresolved
> external symbol __imp__socket@12 Request.obj : error LNK2001: unresolved
> external symbol __imp__WSAStartup@8 Debug/test.dll : fatal error LNK1120:
> 8 unresolved externals Error executing link.exe.
>
> test.dll - 9 error(s), 0 warning(s)[/color]

did you bind the library?

gottfried
puppet_sock@hotmail.com
Guest
 
Posts: n/a
#3: Jul 22 '05

re: error LNK2001: unresolved external symbol


hasan@ozgan.net (ozgan.net) wrote in message news:<f141567f.0407300200.48829de2@posting.google. com>...[color=blue]
> I created my first COM object, but I took below errors. Why I didn't use
> socket functions. I defined *.def file[/color]
[snip]

You will get more and better help if you go to a news group specific
to your compiler and platform. This newsgroup is for standard C++
language questions only.

You could try going to groups.google.com and searching for your
compiler/operating system to get some good ideas for what groups
will be best. Indeed, you may find your question has already
been answered many times. You will probably want to start in one
of the microsoft.public.vc.* newsgroups.
Socks
Closed Thread