• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re[2]: C++ Constructors on global vars not being run ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Re[2]: C++ Constructors on global vars not being run ?
      • From: Andy O'Meara <email@hidden>
    • Re: Re[2]: C++ Constructors on global vars not being run ?
      • From: Thomas Engelmeier <email@hidden>
References: 
 >C++ Constructors on global vars not being run ? (From: Peter Mulholland <email@hidden>)
 >Re: C++ Constructors on global vars not being run ? (From: Peter Mulholland <email@hidden>)

  • Prev by Date: Re: Question about loading external image
  • Next by Date: Re: Re[2]: C++ Constructors on global vars not being run ?
  • Previous by thread: Re: C++ Constructors on global vars not being run ?
  • Next by thread: Re: Re[2]: C++ Constructors on global vars not being run ?
  • Index(es):
    • Date
    • Thread