febo / pinocchio

Create Solana programs with no dependencies attached
Apache License 2.0
89 stars 18 forks source link

Fixed Realloc Macro #45

Closed L0STE closed 4 days ago

L0STE commented 4 days ago

Realloc was broken when trying to use it in a program with the following error:

= note: Undefined symbols for architecture arm64:
"_sol_memset_", referenced from:
    pinocchio::account_info::AccountInfo::realloc::h7b767197c3b52406 in libpinocchio-b1a74aa98b057767.rlib(pinocchio-b1a74aa98b057767.8lu0acfwt9wrlqb8ft0k7wz4l.rcgu.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

By specifying that it needs to target Solana as os this problem is not there anymore