Re[2]: C++ Constructors on global vars not being run ?
Re[2]: C++ Constructors on global vars not being run ?
- Subject: Re[2]: C++ Constructors on global vars not being run ?
- From: Peter Mulholland <email@hidden>
- Date: Mon, 24 Sep 2007 16:29:40 +0100
Thanks for your comments.. i know it seems really odd...
Anyway, what I found out was that the class was being defined in a
seperate file to the main file. There were no other links between main
and this file... at some point the linker decided, as there were no
links between the two, it wouldnt bother linking it!
The deal was this - I'm porting some code which is part of a toolkit.
This uses a C++ class constructor to "register" init/run/uninit
functions of a main app with the toolkit. For some reason, Xcode
decided that as there were no direct calls between the toolkit's code
and the app's code, it wouldn't bother linking, and that's why the
constructor never ran.
My question now is, how do I force Xcode to link ALL object files
given to it, and not try to be clever ?
--
Best regards,
Peter mailto:email@hidden
_______________________________________________
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