• 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
Global array, fails under dynamic, works under static build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Global array, fails under dynamic, works under static build


  • Subject: Global array, fails under dynamic, works under static build
  • From: email@hidden
  • Date: Thu, 21 Jun 2007 11:13:15 -0700 (GMT-07:00)

I have a library which I have built under both Static and Dynamic builds.

When I include the library in my application the Dynamic build version fails during
runtime, my Static build works as expected.

Specifically I have an array of pointers to a structure which is declared
globally. When I assign a pointer to an array element the array in the Static build
accepts the pointer, the array in the Dynamic build remains unchanged.

// In the same file:

// DMFModuleInfo is a structure,
// L1MODULE_COUNT = 12
DMFModuleInfo *gDMFModules[L1MODULE_COUNT];

// ModuleID & n are integers, init->moduleInfo[
// contains an array of pointers to DMFModuleInfo structures.

// The line which fails is
gDMFModules{ModuleID] = init->moduleInfo[n];

This is part of a fairly complex cross platform C/C++ project.
I have tried this under Xcode 2.4.1 & 2.5.
I have not seen this before and am at a loss.

Thanks for your assistance,

- George Lawrence Storm, DivX, Inc.
 _______________________________________________
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: Global array, fails under dynamic, works under static build
      • From: Peter O'Gorman <email@hidden>
  • Prev by Date: RE: "Statement with no effect" warning
  • Next by Date: Problem with Currency Converter tutorial
  • Previous by thread: Re: Crash report doesn't list function names?
  • Next by thread: Re: Global array, fails under dynamic, works under static build
  • Index(es):
    • Date
    • Thread