Trying to load a driver - gcc can't find a file
Hi! I've just installed a RedHat6 and I'm trying to loan a driver for my realtek cardbus ethernet card. I copied the command
gcc -DCARDBUS -DMODULE -D__KERNEL__ -Wall -Wstric-prototypes -O6 -c rtl8139.c -o realtek_cb.o -I/usr/src/linux/pcmcia-cs-3.1.8/include/pcmcia from the driver file rlt8139.c and everything else seems to be fine, but gcc gives me the following line and stops: rtl8139.c:1511: pcmcia/driver_ops.h: No such file or directory. In the driver source file I can find the lines #ifdef CARDBUS #include <pcmcia/driver_ops.h> which must be the reason for this. The file /driver_ops-h didn't come with the driver floppy, but I found a file installed in my computer in /usr/src/linux/pcmcia-cs-3.0.8/include/pcmcia/driver-ops.h. I tried copying this file to all the places I could think of hoping gcc would work, but with no success. Now I'm stuck! Am I missing a file or do I need to change something in the existing file or is there another way of doing this? In the driver floppy there is also a Makefile, but I have absolutely no idea of the make approach, so I feel more comfortable with a 'simple' command like gcc. And wouldn't the same problem with the missing file arise with the makefile, too? If anybody knows what to do, I would be immensly grateful for some help! Cheers, Titta |
Do you have a /usr/src/linux/include directory?
If you do, try moving the whole directory (pcmcia) into there. So you would have /usr/src/linux/include/pcmcia/driver-ops.h as I have a feeling this is where it is looking. If it doesn't work, edit the source file to use " insted of < and > (as that tells the compiler to look locally for the file and not in the global includes). |
Nice one!
I think I already tried moving the directory, but will check that one anyway. I'll try the other one, too, and if it doesn't work I'll be back to you in a couple of days (that's how long it usually takes to try everything out...slow but interesting)!
Thanks a million, Titta |
All times are GMT -5. The time now is 01:18 AM. |