2

I'm trying to compile a native library with hxcpp but i'm getting this error:

test.cpp:15:16: error: no matching function for call to 'foo'
DEFINE_PRIME1v(foo);
               ^~~
/media/Archivos/Lib/haxe/hxcpp/4,0,4/include/hx/CFFIPrime.h:603:41: note: 
      expanded from macro 'DEFINE_PRIME1v'
  value func##__wrap(PRIME_ARG_DECL1) { func(PRIME_ARG_LIST1); return al...
                                        ^~~~
test.cpp:11:6: note: candidate function not viable: no known conversion from
      'cffi::AutoValue' to 'uint8_t *' (aka 'unsigned char *') for 1st argument
void foo(uint8_t *data)
     ^
1 error generated.

I understand it's because of the argument type but I don't know how to solve this.

This is a minimal example of what i'm doing and produces the same error.

test.cpp

#ifndef STATIC_LINK
#define IMPLEMENT_API
#endif

#include <cstdint>

#include <hxcpp.h>
#include <hx/CFFIPrime.h>

void foo(uint8_t *data)
{
    printf("%x\n", data[0]);
}
DEFINE_PRIME1v(foo);
Daniel P.
  • 92
  • 1
  • 7

0 Answers0