error LNK2001: unresolved external symbol

O

ozgan.net

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)
 
G

Gottfried Eibner

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)

did you bind the library?

gottfried
 
P

puppet_sock

I created my first COM object, but I took below errors. Why I didn't use
socket functions. I defined *.def file
[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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top