Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Error compiling network driver in QNX Momentics: (2 Items)
   
Error compiling network driver in QNX Momentics  
Error while compiling network driver in QNX monetics
Hi,

I m trying to compile my network driver in momentics.I include <io-pkt/iopkt_driver.h> file.It throws the following 
error.

C:/QNX641/target/qnx6/usr/include/io-pkt/dev/mii/miivar.h:82: error: field 'mii_media' has incomplete type

Please help me on this.

Thanks and Regards
K.Senthil

Error Logs
======

########## Compiling code in devnp-pe.so ##########
qcc -g -c -M -V gcc_ntox86 -DHOST -w9 -Wpointer-arith -Wshadow -DBUILD_TIME='Thu Nov 26 15:51:55 IST 2009' -
DPRIVATE_LABEL='' -DTARGET_x86 -IC:/ide-4.6-workspace/includes -I./includes -IC:/ide-4.6-workspace/software/includes -IC

:/ide-4.6-workspace/ThirdParty/libxml2/include -IC:/ide-4.6-workspace/ThirdParty/curl/usr/include -IC:/ide-4.6-workspace

/includes -IC:/ide-4.6-workspace/common IC:/QNX641/target/qnx6/usr/include/io-pkt -DNDEBUG -DVARIANT_dll -DBUILDENV_qss 

-shared -o objs/x86/pedriver.o -c src/pedriver.c
In file included from C:/QNX641/target/qnx6/usr/include/io-pkt/iopkt_driver.h:65,
                 from src/pedriver.c:16:
C:/QNX641/target/qnx6/usr/include/io-pkt/dev/mii/miivar.h:82: error: field 'mii_media' has incomplete type
RE: Error compiling network driver in QNX Momentics  
> I include <io-pkt/iopkt_driver.h>
>
> field 'mii_media' has incomplete type

iopkt_driver.h is NOT meant to be a complete
list of header files, sufficient for all drivers
to compile.  It's just a starting point.

For example, if we look at sys/dev_qnx/i82544/i82544.h:

-- cut --

    396 #include <io-pkt/iopkt_driver.h>
    397 #include <stdio.h>
    398 #include <errno.h>
    399 #include <atomic.h>
    400 #include <unistd.h>
    401 #include <stdlib.h>
    402 #include <string.h>
    403 #include <sys/mman.h>
    404 #include <sys/types.h>
    405 #include <sys/siginfo.h>
    406 #include <sys/syspage.h>
    407 #include <sys/neutrino.h>
    408 #include <sys/mbuf.h>
    409 #include <sys/syslog.h>
    410 
    411 #include <net/if.h>
    412 #include <net/if_dl.h>
    413 #include <net/if_types.h>
    414 #include <net/if_ether.h>
    415 #include <net/if_media.h>
    416 #include <sys/io-pkt.h>
    417 #include <sys/cache.h>
    418 #include <sys/callout.h>
    419 #include <hw/inout.h>
    420 #include <drvr/mdi.h>
    421 #include <drvr/eth.h>
    422 //#include <drvr/nicsupport.h>
    423 #include <hw/nicinfo.h>
    424 #include <sys/device.h>
    425 #include <siglock.h>
    426 
    427 #include <dev/mii/miivar.h>
    428 #include <eeprom.h>

-- cut --

Now, I am not saying that you need all of
the above header files included for your
particular driver.  You might need less.
You might need more, depending upon what
your particular driver does, and how it
does it.

But for this particular error, you might 
look at including net/if_media.h

When you are writing drivers, it can really
really really help to look at the source of
other, similar drivers.

--
aboyd


--
aboyd