Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-15-2005, 02:41 AM   #1
LQ Newbie
Registered: Jan 2005
Posts: 11

Rep: Reputation: 0
Question 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
Old 01-16-2005, 05:23 AM   #2
LQ Newbie
Registered: Jan 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Old 01-16-2005, 06:47 AM   #3
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
it would probably be easier to use a header file for the actual structure definition and include the header in both files
Old 01-17-2005, 08:42 AM   #4
LQ Newbie
Registered: Jan 2005
Posts: 11

Original Poster
Rep: Reputation: 0
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
data structure with variable capacity shivaligupta Programming 2 01-31-2005 12:54 PM
error while accessing math functions in kernel modules dypgrp Programming 0 01-19-2005 10:12 AM
accessing functions in kernel modules starbuck8968 Programming 5 12-14-2004 10:42 AM
Accessing Shell variable in awk script dileepkk Linux - General 1 10-07-2004 08:47 AM
Kernel Modules Error slacklinux Linux - Newbie 1 06-17-2004 01:14 AM

All times are GMT -5. The time now is 08:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration