link redeclared as different kind of symbol in [...] works in simulator, not device
i have a objective-c program, i added a little lib with linked list in plain c. this is the header:
in simulator all compiles well, but when i try to compile for device this error occurs
link redeclared as different kind of symbol in...[...]
what is it?
how can i fix this?
thanks
Code:
typedef struct node *link;
struct node { int v; link next; };link redeclared as different kind of symbol in...[...]
what is it?
how can i fix this?
thanks
I'm not sure why that would compile for the iOS Simulator but for for the device, but why not just remove the forward declaration by reorganising the declaration thus:
(I'm also not sure what you would gain by doing that, given that you'll still have to remember that link l = malloc( sizeof( struct node )); - is not having to type an asterix worth that?)
Code:
struct node { int v; struct node *next; };
typedef struct node *link;(I'm also not sure what you would gain by doing that, given that you'll still have to remember that link l = malloc( sizeof( struct node )); - is not having to type an asterix worth that?)
Mark Bishop
You've omitted the most interesting part of the error message....
ok i'll try thanks, i have make so because i was instructed so by school 
mmm...interesting part...?
in [...] there are only name of the file that has inside: #include "linkedList.h"

mmm...interesting part...?
in [...] there are only name of the file that has inside: #include "linkedList.h"
The message should say where the first definition of link is...
thanks for the advice!
i have found that i have an #include "linkedList.h" in
helloworld.h and helloworld.m...
in simulator all went well...strange thing!
however another strange thing...:
in "linkedList.h" i have link and link2k defined in a similar way...but link2k does not gave me that error...mha!
i have found that i have an #include "linkedList.h" in
helloworld.h and helloworld.m...
in simulator all went well...strange thing!
however another strange thing...:
in "linkedList.h" i have link and link2k defined in a similar way...but link2k does not gave me that error...mha!
maybe you're missing header guards on linkedList.h?
You can always just use #import instead of #include too. It's main function is to remove the need to use header guards.
Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
i didn't know that was header guards 
thanks for suggestions!

thanks for suggestions!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Kind of a noob question - finding artwork within my .app?? | Nethfel | 2 | 2,481 |
Mar 8, 2010 08:00 AM Last Post: AndyKorth |
|
| Multiple def. of symbol?? | Greywhind | 1 | 2,060 |
Jun 17, 2006 05:29 PM Last Post: Greywhind |
|
| Undefined symbol & getpixel | Jones | 7 | 4,000 |
May 21, 2006 01:14 AM Last Post: OneSadCookie |
|
| My first Cocoa Game that works! (Pong) | blobbo | 16 | 9,254 |
Aug 4, 2005 03:15 PM Last Post: Andrew |
|

