I’m a bit confused now. I thought that when you used extern on a function, it would become global to everything, but it doesn’t seem so… What I want right now, is to have some set of functions that I can use in my static library and in the program that links it. How do I that?
I’m using Objective-C
I’m a bit confused now. I thought that when you used extern on a
Share
It works for me, if I just use
externinstead ofextern inlinewhen defining the function.Example: inlib.h
inlib.m:
Library created with:
gcc -ObjC -c inlib.m -o inlib.oar -q lib.a inlib.ocaller.m:
Compiled with:
gcc -ObjC -o caller caller.m lib.a -lobjcRun with:
./callerReturns: