link error on global variable in static library
link error on global variable in static library
- Subject: link error on global variable in static library
- From: James Walker <email@hidden>
- Date: Mon, 13 Jun 2011 11:05:03 -0700
When I try to link an app with a certain static library, I get this
error from Xcode 3.2.6:
Undefined symbols:
"_g_bar", referenced from:
_g_bar$non_lazy_ptr in libLexSaurusSpeller.a(BTOPEN.o)
(maybe you meant: _g_bar$non_lazy_ptr)
That "maybe you meant" part isn't very enlightening.
The static library is C code compiled with GCC 4.0. I can see that one
source file has
int g_bar;
in global scope, and another (BTOPEN.c) has
extern int g_bar;
in global scope. I expect I can work around the problem by introducing
accessor functions, but what could I be missing?
--
James W. Walker, Innoventive Software LLC
<http://www.frameforge3d.com/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden