iDevGames Forums
"forward declaration" compiling error - Printable Version

+- iDevGames Forums (
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: "forward declaration" compiling error (/thread-3001.html)

"forward declaration" compiling error - muby99 - Oct 7, 2007 06:35 AM

hi all,
Im compiling this code for wireless network gaming, but after i run 'make' i get this error

Quote:node-common/ll-arp.o node-common/
./80211/net-interface-80211.h:59: error: invalid use of undefined type ‘struct NetInterface’
node-common/ll-arp.h:49: error: forward declaration of ‘struct NetInterface’
./80211/net-interface-80211.h:107: error: invalid use of undefined type ‘struct NetInterfaceConstructor’
./node-common/net-node.h:52: error: forward declaration of ‘struct NetInterfaceConstructor’

the class called in net-interface-80211.h is

Quote:class NetInterface80211 : public NetInterface {
virtual ~NetInterface80211 ();

int getBSSID (void);

what should i do?

thank you

"forward declaration" compiling error - akb825 - Oct 7, 2007 12:56 PM

You need to #include the header that defines NetInterface. If it's in the same file, you need to make sure it appears before you declare NetInterface80211.