[erlang-questions] iPhone_Erlang Static Library

Davichi pavel harmlessbystandard@REDACTED
Sat Sep 5 05:04:36 CEST 2009


I have managed to compile erts into a static library. However there are a few warnings that I have to get rid of. Here they are:

"Initialization from incompatible pointer" 

This happens in bin_drv.c, multi_drv.c, and sys.c. All of these come from the contents of structs based off of the struct erl_drv_entry.

Any help would be nessasary.

Here is a bit of the code that I have changed but throws the errors:

struct erl_drv_e multi_driver_entry = {
    multi_init,
    multi_start,    # Throws the warning
    multi_stop,     #throws the warning
    multi_erlang_read,  #Throws the warning
    NULL,
    NULL,
    "multi"
};

const struct erl_drv_entry bin_driver = {
    bin_init,
    bin_start, #Throws the warning
    bin_stop, #Throws the warning
    bin_erlang_read,  #Throws that warning
    NULL,
    NULL,
    "binary_filer"
};





Sometimes you have to stand in the mud to get anything done

-Loki-





________________________________
From: Davichi pavel <harmlessbystandard@REDACTED>
To: erlang-questions@REDACTED
Sent: Friday, September 4, 2009 12:54:56 PM
Subject: [erlang-questions] iPhone_Erlang Static Library

So I have been working on turning Erlang into a static library for the iPhone, and I have almost finished. However, I have two errors that I don't know how to fix:

multi_drv.c:47:0 Variable 'multi_driver_entry' has initializer but incomplete type
mem_drv.c:38:0 Variable 'mem_driver_entry' has initializer but incomplete type



I am not proficient enough in C or C++ to figure these out. Can someone give me some advice about this?

Here's the code where its throwing the error:

struct driver_entry multi_driver_entry = {
    multi_init,
    multi_start,
    multi_stop,
    multi_erlang_read,
    NULL,
    NULL,
    "multi"
};

const struct driver_entry mem_driver_entry = {
    mem_init,
    mem_start,
    mem_stop,
    mem_command,
    NULL,
    NULL,
    "mem_drv"
};

Samuel Barney


      


More information about the erlang-questions mailing list