FROM : Paul
DATE : Sun Jan 13 05:04:21 2008
Igor was correct.
The problem was that I was initializing these values in my header
files. I don't know why I thought that was a good idea, but it seemed
to make sense at the time.
Thanks, everyone, for your help!
On Jan 12, 2008, at 3:17 PM, Igor Mozolevsky wrote:
> On 12/01/2008, Paul <<email_removed>> wrote:
>> The LINKER is confused? What about me? ;-)
>>
>> My definitions for the two example errors are:
>>
>> NSString *ACMTriggerEnabledVisibleKey =
>> @"triggerEnabledIsVisbleInTable";
>> and
>> NSRange shortRange = { 2, 8 };
>>
>> The first one being for the PreferenceController and the second one
>> being used with substringWithRange:
>>
>> They are defined in separate (from each other) .h files, and I have
>> verified that they are both defined only once.
>
> Ah, ok, so your problem, or rather the linker's problem with you, is
> that you've initialized those variables in the .h files. Each of the
> .m files is compiled separately into an object (.o) file. Each object
> file basically contains some binary code to execute and a table of
> symbols. Now, if your .h file is included in several .m files, each .o
> file from the .m file would have a definition of the variables you use
> (ignore the underscore).
>
> (A really naive version of what's going on is) The linker then joins
> all of the .o files and libraries into a single executable. To do so
> the linker builds a table of symbols for the executable from the
> tables included in the objects, but when it encounters the same symbol
> name together with an explicit definition of what value the symbol
> holds, the linker gets really confused (it doesn't care that the
> values are identical, as far as it knows the symbols must not be
> redefined. The way to fix it is to use extern:
>
> http://groups.google.com/group/comp.lang.c/browse_thread/thread/d5a63ea037fadb18/414a0636c308baff?lnk=st&q=extern
>
> Cheers,
> Igor :-)
***** Paul *****
<email_removed>
<email_removed>
ICQ #11034669
-----
>>> Bozosity Of The Day <<<
Daily proof that there is no shortage of bozosity when it comes to
expert pontifications. From garage.com:
------------------------------------------------------------------
"[Man will never reach the moon] regardless of all future scientific
advances."
-- Lee DeForest, inventor of the audion tube, New York Times, February
25, 1957
DATE : Sun Jan 13 05:04:21 2008
Igor was correct.
The problem was that I was initializing these values in my header
files. I don't know why I thought that was a good idea, but it seemed
to make sense at the time.
Thanks, everyone, for your help!
On Jan 12, 2008, at 3:17 PM, Igor Mozolevsky wrote:
> On 12/01/2008, Paul <<email_removed>> wrote:
>> The LINKER is confused? What about me? ;-)
>>
>> My definitions for the two example errors are:
>>
>> NSString *ACMTriggerEnabledVisibleKey =
>> @"triggerEnabledIsVisbleInTable";
>> and
>> NSRange shortRange = { 2, 8 };
>>
>> The first one being for the PreferenceController and the second one
>> being used with substringWithRange:
>>
>> They are defined in separate (from each other) .h files, and I have
>> verified that they are both defined only once.
>
> Ah, ok, so your problem, or rather the linker's problem with you, is
> that you've initialized those variables in the .h files. Each of the
> .m files is compiled separately into an object (.o) file. Each object
> file basically contains some binary code to execute and a table of
> symbols. Now, if your .h file is included in several .m files, each .o
> file from the .m file would have a definition of the variables you use
> (ignore the underscore).
>
> (A really naive version of what's going on is) The linker then joins
> all of the .o files and libraries into a single executable. To do so
> the linker builds a table of symbols for the executable from the
> tables included in the objects, but when it encounters the same symbol
> name together with an explicit definition of what value the symbol
> holds, the linker gets really confused (it doesn't care that the
> values are identical, as far as it knows the symbols must not be
> redefined. The way to fix it is to use extern:
>
> http://groups.google.com/group/comp.lang.c/browse_thread/thread/d5a63ea037fadb18/414a0636c308baff?lnk=st&q=extern
>
> Cheers,
> Igor :-)
***** Paul *****
<email_removed>
<email_removed>
ICQ #11034669
-----
>>> Bozosity Of The Day <<<
Daily proof that there is no shortage of bozosity when it comes to
expert pontifications. From garage.com:
------------------------------------------------------------------
"[Man will never reach the moon] regardless of all future scientific
advances."
-- Lee DeForest, inventor of the audion tube, New York Times, February
25, 1957
| Related mails | Author | Date |
|---|---|---|
| Paul | Jan 12, 01:13 | |
| Tommy Nordgren | Jan 12, 01:59 | |
| Paul | Jan 12, 02:20 | |
| Tommy Nordgren | Jan 12, 03:52 | |
| Paul | Jan 12, 04:54 | |
| Kyle Sluder | Jan 12, 05:25 | |
| Paul | Jan 12, 05:43 | |
| Paul | Jan 12, 05:45 | |
| Kyle Sluder | Jan 12, 08:01 | |
| Paul | Jan 12, 08:11 | |
| Kyle Sluder | Jan 12, 08:36 | |
| Paul | Jan 12, 17:27 | |
| Kyle Sluder | Jan 12, 17:39 | |
| Paul | Jan 13, 05:04 | |
| Uli Kusterer | Jan 14, 09:50 |






Cocoa mail archive

