htons ->linking error?? 
Author Message
 htons ->linking error??

I want to use the function htons in a console application, I have
created a console workspace and I get the next linking error:

Linking...

Debug/VisaPay.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I think I must do some settings becouse I think he can't find a
library. Did anyone know how I can solve this problem???

thanks in advance
kris

Sent via Deja.com
http://www.*-*-*.com/



Mon, 07 Jul 2003 03:20:52 GMT  
 htons ->linking error??
in the documentation for htons it says under requirements:
  Version: Requires Windows Sockets 1.1 or later.
  Header: Declared in Winsock2.h.
  Library: Use Ws2_32.lib.

The line that is of interest is: Library: Use Ws2_32.lib.

So under Project/Settings select the Link tab select Category: General.
Add Ws2_32.lib to the Object/Library modules list.

There. That wasn't so hard was it.

Nick

--

Quote:

> I want to use the function htons in a console application, I have
> created a console workspace and I get the next linking error:

> Linking...

> Debug/VisaPay.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.

> I think I must do some settings becouse I think he can't find a
> library. Did anyone know how I can solve this problem???

> thanks in advance
> kris

> Sent via Deja.com
> http://www.deja.com/



Mon, 07 Jul 2003 05:28:16 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. htons -> linking problem

2. htons -> linking problem

3. >> Error with linked list

4. linking error with <afx.h>

5. VC6/MFC include DLL -> link error

6. SP3->SP4 link error

7. Link Errors when including <htmlctrl.h>

8. Why this bitwise error (>>>)

9. dynamic link -> static link

10. >>Linked List Memory Problems???

11. htons mismatch compile waring?

12. undefined reference to setsockopt, inet_addr, socket, htons

 

 
Powered by phpBB® Forum Software