Re: Compile errors
Re: Compile errors
- Subject: Re: Compile errors
- From: Barry Fawthrop <email@hidden>
- Date: Thu, 26 Feb 2009 23:19:08 -0500
Greg Parker wrote:
>
> On Feb 26, 2009, at 10:21 AM, Barry Fawthrop wrote:
>
>> To All, Greetings
>>
>> I'm trying to build my first iPhone app which has some Kerberos
>> functionality
>>
>> So I have the files asn1_encode.h and asn1_encode.mm, etc... ....
>>
>> Inside my App control AppController.mm
>>
>>
>> I call the relevant procedures/functions as I need them
>> When I compile I get the following
>> (red circle white x) "_asn1_make_etag", referenced from:
>> _encode_as_req in AppController.o
>> _encode_as_req in AppController.o
>> _encode_as_req in AppController.o
>> _encode_as_req in AppController.o
>> _encode_as_req in AppController.o
>> (red circle whit x) "_asn12krb5_buf", referenced from
>> _encode_as_req in AppController.o
>> ...
>> ...
>> ...
>>
>>
>> the "... in AppController.o" lines correspond to the number of times
>> the function "... referenced from:" is called in the code
>> So I call asn12krb5_buf once so it appears once.
>> I call asn1_make_etag 5 times so it appears 5 times.
>>
>> The functions exists in the other files and are called using
>> #import "asn1_encode.h"
>> #import "asn1_make.h"
>> etc..
>>
>> There is no other details about what the error is???
>> any ideas
>
> Strictly speaking, these are linker errors, not compiler errors. Your
> encode_as_req() function is calling asn1_make_etag() and
> asn12krb5_buf(), but the linker can't find the definitions of those two
> functions.
>
> Your #imports are probably fine, assuming you didn't see any compiler
> warnings about those functions. Instead, you need to find out where
> asn1_make_etag() and asn12krb5_buf() are supposed to be and why the
> linker doesn't see them.
> * Make sure those two functions are actually implemented in some file.
> Watch out for any #if that can hide an otherwise normal implementation.
> * Make sure that file is being compiled by your project. Adding `#error
> compile me!` to the top of asn-whatever.mm is a good way to triple-check
> that; if you get no error, it's not being compiled.
> * Beware of C++ name-mangling. If your asn-whatever.mm file says `extern
> "C"` in it, then you might need to rename it to asn-whatever.m.
>
>
To Greg Thank for the input
I have asn1_encode.mm
and AppController.m
I changed this to AppController.mm and all worked fine ???
Thanks again
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden