www.elektronik.si Seznam forumov www.elektronik.si
Forum o elektrotehniki in računalništvu
 
 PomočPomoč  IščiIšči  Seznam članovSeznam članov  SkupineSkupine  StatisticsStatistika  AlbumAlbum  DatotekeFilemanager DokumentacijaDocDB LinksPovezave   Registriraj seRegistriraj se 
  PravilaPravila  LinksBolha  PriponkePriponke  KoledarKoledar  ZapiskiZapiski Tvoj profilTvoj profil Prijava za pregled zasebnih sporočilPrijava za pregled zasebnih sporočil PrijavaPrijava 

uIP: napaka pri kompajliranju

 
Objavi novo temo   Odgovori na to temo   Printer-friendly version    www.elektronik.si Seznam forumov -> AVR, LPC900, x51
Poglej prejšnjo temo :: Poglej naslednjo temo  
Avtor Sporočilo
rudiP
Član
Član



Pridružen-a: Tor 07 Avg 2007 15:30
Prispevkov: 1234
Aktiv.: 5.67
Kraj: KOPER

PrispevekObjavljeno: Pon Okt 27, 2008 9:28 pm    Naslov sporočila: icon_question uIP: napaka pri kompajliranju Odgovori s citatom

kompajler WinAVR mi pokaže napako " undefined reference to `uip_conn' ". Reference ne znam razvozlati, zato prosim člane foruma, če mi lahko pomagajo pri rešitvi problema. Hvala.


Koda:




 /*
   * The uip_conn structure has a field called "appstate" that holds
   * the application state of the connection. We make a pointer to
   * this to access it easier.
   */
 -> struct hello_world_state *s = &(uip_conn->appstate); // napaka: undefined reference to `uip_conn'
   
  /**
 * Representation of a uIP TCP connection.
 *
 * The uip_conn structure is used for identifying a connection. All
 * but one field in the structure are to be considered read-only by an
 * application. The only exception is the appstate field whos purpose
 * is to let the application store application-specific state (e.g.,
 * file pointers) for the connection. The size of this field is
 * configured in the "uipopt.h" header file.
 */
struct uip_conn {
  u16_t ripaddr[2];   /**< The IP address of the remote host. */
    u16_t lport;        /**< The local TCP port, in network byte order. */
  u16_t rport;        /**< The local remote TCP port, in network byte order. */ 
  u8_t rcv_nxt[4];    /**< The sequence number that we expect to receive next. */
  u8_t snd_nxt[4];    /**< The sequence number that was last sent by  us. */
  u16_t len;          /**< Length of the data that was previously sent. */
  u16_t mss;          /**< Current maximum segment size for the connection. */
  u16_t initialmss;   /**< Initial maximum segment size for the connection. */ 
  u8_t sa;            /**< Retransmission time-out calculation state variable. */
  u8_t sv;            /**< Retransmission time-out calculation state variable. */
  u8_t rto;           /**< Retransmission time-out. */
  u8_t tcpstateflags; /**< TCP state and flags. */
  u8_t timer;         /**< The retransmission timer. */
  u8_t nrtx;          /**< The number of retransmissions for the last segment sent.*/

  /** The application state. */
  u8_t appstate[UIP_APPSTATE_SIZE]; 

_________________
Lep pozdrav iz Kopra Rudi
Nazaj na vrh
Odsoten Poglej uporabnikov profil Pošlji zasebno sporočilo
Umnik
Član
Član



Pridružen-a: Čet 16 Sep 2004 17:52
Prispevkov: 958
Aktiv.: 4.04
Kraj: Novo mesto

PrispevekObjavljeno: Pon Okt 27, 2008 10:01 pm    Naslov sporočila:   Odgovori s citatom

Tukaj recimo je najverjetneje problem sama uporaba strukture. Moralo bi biti nekaj takega:
Koda:

struct hello_world_state *s =(struct hello_world_state *)&(uip_conn->appstate);

vendar moraš vedeti, kaj boš s strukturo hello_world_state sploh počel.
Lahko je to struktura uporabljena za smtp, telnet morda http server, ali pa kaj podobnega, za začetek (da se compiler neha pritoževat) je zadosti že, če obstaja:
Koda:

struct hello_world_state { u8_t karkoli; };
Nazaj na vrh
Odsoten Poglej uporabnikov profil Pošlji zasebno sporočilo
chaos
Član
Član



Pridružen-a: Sob 16 Sep 2006 22:12
Prispevkov: 1063
Aktiv.: 4.66
Kraj: Zagorje ob Savi

PrispevekObjavljeno: Tor Okt 28, 2008 6:35 am    Naslov sporočila:   Odgovori s citatom

Verjetno bo pomagalo, če prestaviš definicijo strukture višje v kodi, kot vrstica, kjer jo uporabiš in ti javi napako.

LP!
Nazaj na vrh
Odsoten Poglej uporabnikov profil Pošlji zasebno sporočilo
Pokaži sporočila:   
Objavi novo temo   Odgovori na to temo   Printer-friendly version    www.elektronik.si Seznam forumov -> AVR, LPC900, x51 Časovni pas GMT + 2 uri, srednjeevropski - poletni čas
Stran 1 od 1

 
Pojdi na:  
Ne, ne moreš dodajati novih tem v tem forumu
Ne, ne moreš odgovarjati na teme v tem forumu
Ne, ne moreš urejati svojih prispevkov v tem forumu
Ne, ne moreš brisati svojih prispevkov v tem forumu
Ne ne moreš glasovati v anketi v tem forumu
Ne, ne moreš pripeti datotek v tem forumu
Ne, ne moreš povleči datotek v tem forumu

Uptime: 493 dni


Powered by phpBB © 2001, 2005 phpBB Group