Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6112973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:48:21+00:00 2026-05-23T14:48:21+00:00

i have a objective-c program, i added a little lib with linked list in

  • 0

i have a objective-c program, i added a little lib with linked list in plain c.
this is the 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 all compiles well, but when i try to compile for device
this error occurs
link redeclared as different kind of symbol in…[…]
how can i fix this?
thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:48:21+00:00Added an answer on May 23, 2026 at 2:48 pm

    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!

    use #import instead of #include. It’s main function is to remove the need to use header guards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Objective: I have a list of header files (about 50 of them), And each
This is my first ever attempt at a Objective-c cocoa program, so I have
I've got a little objective-c utility program that renders a convex hull. (This is
I have an integer array in my Objective-C program. I'd like to sort it
I have a Java program (call it Jack) and an Objective-C program (call it
I have an NSArray of Foos in an Objective-C program. I would like to
I have some Objective-C code that looks like this: #define myVar 10 float f
Say I have the following Objective-C class: @interface Foo { int someNumber; NSString *someString;
I have a Cocoa/Objective-C program, I set it up the way it wants, with
I have an objective-C program and I am using ARC (Automatic Reference Counting), it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.