Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Does ws2_32.lib bundled in BCB 6 support IPv6?


This question is answered.


Permlink Replies: 1 - Last Post: Dec 12, 2016 10:56 AM Last Post By: Remy Lebeau (Te...
CN Liou

Posts: 8
Registered: 7/18/03
Does ws2_32.lib bundled in BCB 6 support IPv6?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 11, 2016 8:06 AM
Hi!

When iLink32 tries to link my BCB 6 project with my hand made library built from ZeroMQ source, it gives this error:

[Linker Error] Unresolved external '_in6addr_any' referenced from C:\ZEROMQ.LIB|tcp_address

I have already added ws2_32.lib to this project. As BCB 6 is quite old, I wonder if its ws2_32.lib supports IPv6 although Windows XP seems to support IPv6 according to MS web site.

How do I fix the error?
Which .lib file should I add in order to get in6addr_any linked in?
Is newer ws2_32.lib provides in6addr_any ? If the answer is "yes", where can I get it, from MS VC++?

Thanks in advance for the helps!
Best Regards,
CN
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Does ws2_32.lib bundled in BCB 6 support IPv6?
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 12, 2016 10:56 AM   in response to: CN Liou in response to: CN Liou
CN wrote:

I have already added ws2_32.lib to this project. As BCB 6
is quite old, I wonder if its ws2_32.lib supports IPv6

No, it does not. BCB 6 pre-dated IPv6, and even XP.

That is not to say that you can't use IPv6 at all, becaue you can. You would
just have to define any missing structs directly in your code, and stick
with the BSD socket functions, or dynamically load newer DLL functions at
runtime, that support IPv6 parameters.

How do I fix the error?

You can implement your own in6addr_any variable in your own code. It is
not hard. Simply declare an in6_addr variable that is initialized to all
zeros.

Which .lib file should I add in order to get in6addr_any linked in?

ws2_32.lib is the correct lib. It is just that the one you have is too old.

Is newer ws2_32.lib provides in6addr_any ? If the answer is
"yes", where can I get it, from MS VC++?

Yes, but not from VC++, because MS .libs are not compatible with BCB. You
would need an updated .lib file from a newer BCB version instead.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02