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

Serge Aleynikov serge@REDACTED
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, mastah_killah@REDACTED 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 @erl_init@REDACTED
> InstantMission.obj : error LNK2001: unresolved external symbol @erl_send@REDACTED
> InstantMission.obj : error LNK2001: unresolved external symbol
> @erl_connect@REDACTED
> InstantMission.obj : error LNK2001: unresolved external symbol
> @erl_receive_msg@REDACTED
> InstantMission.obj : error LNK2001: unresolved external symbol
> @erl_free_term@REDACTED
> InstantMission.obj : error LNK2001: unresolved external symbol
> @erl_connect_init@REDACTED
> InstantMission.obj : error LNK2001: unresolved external symbol
> @erl_element@REDACTED
> ..\..\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
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list