[erlang-questions] c-node: Link error in Visual C++

Serge Aleynikov <>
Sun May 20 04:21:38 CEST 2012


Looks like you forgot to wrap the C code in the extern "C" section:

extern "C" {
  #include "erl_interface.h"
  #include "ei.h"
}

and therefore the C++ compiler does name mangling and can't find
relevant entries.


On 5/16/2012 12:06 PM,  wrote:
> Hello,
> 
> I'm trying to compile the c-node example on Windows.
> I have the following:
> 
> #include <stdio.h>
> #include <stddef.h>
> #include <winsock2.h>
> 
> 
> #include "erl_interface.h"
> #include "ei.h"
> 
> And I have included ei.lib,erl_interface.lib, and ws2_32.lib.
> 
> However I'm getting the following error:
> 
> InstantMission.obj : error LNK2001: unresolved external symbol @
> InstantMission.obj : error LNK2001: unresolved external symbol @
> InstantMission.obj : error LNK2001: unresolved external symbol
> @
> InstantMission.obj : error LNK2001: unresolved external symbol
> @
> InstantMission.obj : error LNK2001: unresolved external symbol
> @
> InstantMission.obj : error LNK2001: unresolved external symbol
> @
> InstantMission.obj : error LNK2001: unresolved external symbol
> @
> ..\..\Debug\missions\\maseInstant.dll : fatal error LNK1120: 7
> unresolved externals
> 
> Thanks in advance.
> 
>   
> 
> Ihr WEB.DE Postfach immer dabei: die kostenlose WEB.DE Mail App für
> iPhone und Android.   
> *https://produkte.web.de/freemail_mobile_startseite/*
> 
> 
> 
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list