LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   error in accessing structure variable in kernel modules (https://www.linuxquestions.org/questions/programming-9/error-in-accessing-structure-variable-in-kernel-modules-277988/)

dypgrp 01-15-2005 01:41 AM

error in accessing structure variable in kernel modules
 
we have typed a kernel module in which we r tryin to access the structure variable. the structure is defined in one .c file and we refferin it to in other .c file.When compiling the module (make), we get an error message sayin "dereferencing pointer to an incomplete type".How can we remove this error.
Pls reply to our querry as soon as possible
Thanks
dypgrp

dypgrp 01-16-2005 04:23 AM

PLEASE REPLY SOON

__J 01-16-2005 05:47 AM

it would probably be easier to use a header file for the actual structure definition and include the header in both files

dypgrp 01-17-2005 07:42 AM

reply to previous mail
 
we have tried tht but when we include the header file in both the .c files and mention it as a dependency in makefile while doing insmod for inserting module it says redefinition of structure

so it tht we have to specify in just one .c file and then include the .c file in the other .c file because our one c file depends on other c file caus it make a function call defined in other c file

sometimes we get unresolved symbol error too

so wht will be th best possible solution
bye do reply soon


All times are GMT -5. The time now is 08:54 AM.