 |
www.elektronik.si Forum o elektrotehniki in računalništvu
|
Poglej prejšnjo temo :: Poglej naslednjo temo |
Avtor |
Sporočilo |
rudiP Član

Pridružen-a: Tor 07 Avg 2007 15:30 Prispevkov: 1234 Aktiv.: 5.67 Kraj: KOPER
|
Objavljeno: Pon Okt 27, 2008 9:28 pm Naslov sporočila: uIP: napaka pri kompajliranju |
|
|
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 |
|
 |
Umnik Član

Pridružen-a: Čet 16 Sep 2004 17:52 Prispevkov: 958 Aktiv.: 4.04 Kraj: Novo mesto
|
Objavljeno: Pon Okt 27, 2008 10:01 pm Naslov sporočila: |
|
|
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 |
|
 |
chaos Član


Pridružen-a: Sob 16 Sep 2006 22:12 Prispevkov: 1063 Aktiv.: 4.66 Kraj: Zagorje ob Savi
|
Objavljeno: Tor Okt 28, 2008 6:35 am Naslov sporočila: |
|
|
Verjetno bo pomagalo, če prestaviš definicijo strukture višje v kodi, kot vrstica, kjer jo uporabiš in ti javi napako.
LP! |
|
Nazaj na vrh |
|
 |
|
|
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
|