objective c - link redeclared as different kind of symbol in -


i have objective-c program, added little lib linked list in plain c. header:

    typedef struct { int v; int w; } edge; edge edge(int, int);  typedef enum tagtiponodo {     k_casellapolozia,     k_casellakiller } tiponodo;  typedef struct node *link; struct node { int v; link next; };  typedef struct node2v *link2v; struct node2v { int v; int val; link2v next; }; link2v new2v(int v, int val, link2v next); void del2v(int v, link2v *lista); void update2v(int v, int val, link2v lista); link sort2x(link2v lista); link sort2xdecr(link2v lista); int maxinlist(link2v lista);   struct graph { int v; int e; link *adj; int *tipo;};  typedef struct graph *graph; graph graphinit(int);  void graphinserte(graph, edge);  void graphremovee(graph, edge);   int graphedges(edge [], graph g); graph graphcopy(graph);  void graphdestroy(graph);  void graphshow(graph g); void ingr(); link nodeindistance(graph g, int a, int distance); link nodeindistanceoftype(graph g, int a, int distance, tiponodo tipo); int distance(graph g, int a, int b,tiponodo tipo); int shortestpath(graph g, int a, int b, tiponodo tipo, int *percorso); link shortestpathlist(graph g, int a, int b, tiponodo tipo);  int distanceforallocation(graph g, int a, int b, tiponodo tipo); void setpesofornode(int n,int poliziotto); void resetpesofornode(int poliziotto); void resetpesoforallnodes();  void initcaspoliz(); link new(int v, link next); void del(int v, link *lista); link copylist(link l);  int lengthlist(link l); int lengthlistoftype(graph g,link l,tiponodo tipo); void deletelist(link *lista); int ispresentinlist(link lista,int val); void printcasellevietate(); 

in simulator compiles well, when try compile device error occurs
link redeclared different kind of symbol in...[...] how can fix this? thanks

i have found have #include "linkedlist.h" in helloworld.h , helloworld.m... in simulator went well...strange thing!

however strange thing...: in "linkedlist.h" have link , link2k defined in similar way...but link2k not gave me error...mha!

use #import instead of #include. it's main function remove need use header guards


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -