• 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
Static lib dependent project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static lib dependent project


  • Subject: Static lib dependent project
  • From: Jeff Rehbein <email@hidden>
  • Date: Fri, 24 Jun 2005 17:23:00 -0500

I've been having a horrible time trying to get my current project building the way I want it to (in XCode 2.1).

Here's the details:

The project is a single cpp that tests the functionality of a couple libraries. The libraries are Carbon static libraries, built from separate projects. These projects are added to the test project. The resulting libs have been added as direct dependancies to the target. Finally, the libs have been added to list of libs/frameworks to link.

This all builds fine, but fails spectacularly during static initialization (see below).

For sanity, I have a different version of the project that simply has the source of the libs instead of linking to the libs. This project runs just fine, even with Guard Malloc on.

As for how the libs-based project fails:

-It will simply crash on something in the static initialization. What it crashes on is consistent until I set breakpoints that get hit. Then the crash will move to something else until the breakpoints that get hit are changed.
-The debugger will show garbage for things, like "<incomplete type>" or "0x20" on a function parameter that was just passed in as a string literal. These things show up fine in the working project. In this case, the crash is related to this string. Come to think of it, all the crashes might be related to string literals...
-I just played around with the string literal theory, but haven't come up with anything. I tried toggling the "Make strings read-only" setting in all projects, but it didn't help. There are plenty of string literals in static init calls that aren't causing issues.


If it matters, the lib projects were originally created in XCode 2.0, and the 2.1 projects were upgraded from those. I've since changed the build config names to Debug/Release to match the newer project. I also have all projects building to the same directory, in case that's necessary. I've looked for possible bad or mismatched settings between the projects, but I haven't found any culprits.

Anyone have any ideas about what could be causing this, or better ways to set this project up to avoid such issues?

Thanks,
Jeff

_______________________________________________
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


  • Prev by Date: [SOLVED] Re: 10.2.8 SDK Cross-development
  • Next by Date: Re: Subversion Included?
  • Previous by thread: Nerd Out with GDB (new blog announcement)
  • Next by thread: DrawMenuBar
  • Index(es):
    • Date
    • Thread