unresolved external symbol in6addr_loopback

Håkan Markström 0 Reputation points


unresolved external symbol in6addr_loopback

Because of this:

In ws2ipdef.h

Begin with:

#ifdef __cplusplus
extern "C" {
extern CONST IN6_ADDR in6addr_loopback;

In in6addr.h

typedef struct in6_addr {
    union {
        UCHAR       Byte[16];
        USHORT      Word[8];
    } u;

Thats all. Why can't it find in6addr_loopback

It is not my code. It is from:


Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,514 questions
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,630 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 83,106 Reputation points

    I just downloaded Mosquitto and I could compile the \lib ([File] [New] [Project From Existing Code...]) with :

    [C++] [Preprocessor] Preprocessor Definitions


    [Linker] [Input] Additional Dependencies


    [General] [Configuration Type]

    Dynamic Library (.dll)


    1>Mosquito.vcxproj -> E:\Sources\mosquitto-master\lib\x64\Debug\Mosquito.dll

    1>Done building project "Mosquito.vcxproj".

    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

    1 person found this answer helpful.
    0 comments No comments

  2. Håkan Markström 0 Reputation points

    I didn't do a DLL file but change C++ and Linker as you have done and now I can start the app but it crasches all the time because they use lot of pionters with no values in the mosquitto code and you get access violation. I have all the code in one file just to debug it.

    I'm using Visual Studio 2022 and you can't do x86 C++ program anymore. You get error in .h files if you try.

    So thanks for the tips about ws2_32.lib. I checked the linker att that lib was missing.

    0 comments No comments