How do I satisfy the need for copyString when using --os:standalone --gc:none ?
Thanks, Mark
var s = "a" & "b"
to tests/manyloc/standalone/barebone.nim
and received "system module needs: copyString"
How do I satisfy this requirement? Thanks, Mark.
Sorry - I neglected to mention that I am using --app:staticlib and linking the the generated c code to a host program that provides services by exporting procs and the nim code uses importc to call the services. One service is to broadcast a string on bluetooth, hence the desire to concatenate strings.
So, I'm not developing an operating system - maybe I shoudn't use os:standalonegc:none?
There is no os - the host program does not use one.
I went back to --app:staticlib --os:standalone --gc:none and simplified my project to just qemu for the purpose of getting strings to work: https://github.com/markprocess/nim-ultibo-prototype
Without standalone, I get the following things like stdio.h in stdlib_system.c, which I don't want:
/* Generated by Nim Compiler v0.18.1 */ /* (c) 2018 Andreas Rumpf */ /* The generated code is subject to the original license. */ /* Compiled for: Linux, amd64, gcc */ /* Command for C compiler: gcc -c -w -O3 -fno-strict-aliasing -I'/root/.choosenim/toolchains/nim-#devel/lib' -o /root/.cache/nim/nimmain_r/stdlib_system.c.o /root/.cache/nim/nimmain_r/stdlib_system.c */ #define NIM_NEW_MANGLING_RULES #define NIM_INTBITS 64 #include "nimbase.h" #include <sys/mman.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <setjmp.h> #include <signal.h>
Without standalone, I get the following things like stdio.h in stdlib_system.c, which I don't want:
"stdio.h" doesn't prevent --app:staticlib.
stdlib_system.c:8:22: fatal error: sys/mman.h: No such file or directory