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

mastah killah mastah_killah@REDACTED
Mon May 21 06:51:07 CEST 2012


Why, when I use dumpbin on the library, does it not show exported symbols?:

dumpbin.exe /exports ei.lib
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file ei.lib

File Type: LIBRARY

   Summary

          15B .bss
         178B .data
       1A5CC4 .debug$S
         3180 .debug$T
         22E0 .drectve
           20 .rdata
         D73A .text

dumpbin.exe /exports erl_interface.lib
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file erl_interface.lib

File Type: LIBRARY

   Summary

          618 .bss
          320 .data
        4DFD4 .debug$S
          7BC .debug$T
          545 .drectve
         77C3 .text


On 21.05.2012 04:00, mastah killah wrote:
> Hello,
>
> this does not work. Already tried. Same error.
> Using VS 2008 btw.
>
>
>
>
>
> On 20.05.2012 04:21, Serge Aleynikov wrote:
>> 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
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list