I compiled a small C source code to a static library. I try to address and use the functions inside through the PureBasic Import : EndImport statements. However I get that error above on compile time. Any ideas what the cause can possibly be? I use a 64 Bit operating system, 64 Bit version of PureBasic and compiled the C code for x86_64 architecture. I contacted the developer who told me about the code being fully 64 bit compatible, he even wrote it on a 64 bit system with a 64 bit compiler.purebasic.asm:107: error: macho: sorry, cannot apply 32 bit absolute relocations in 64 bit mode, consider "[_symbol wrt rip]" for mem access, "qword" and "dq_foo" for pointers.
I compiled the static library once with Xcode but also manually in the terminal, with no difference. I hoped, Xcode would use some flags I do not know about which make it work. That is what I used for manual compilation via terminal:
Code: Select all
gcc -c -o lib.o lib.c
ar rcs lib.a lib.o
It appears like I dug up something special, nothing all over the internet about such issue related to PureBasic. I just found something on Github, but that was not related.