LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 01-15-2005, 01:41 AM   #1
dypgrp
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
Thanks
dypgrp
 
Old 01-16-2005, 04:23 AM   #2
dypgrp
LQ Newbie
 
Registered: Jan 2005
Posts: 11

Original Poster
Rep: Reputation: 0
PLEASE REPLY SOON
 
Old 01-16-2005, 05:47 AM   #3
__J
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, 07:42 AM   #4
dypgrp
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
 
  


Reply


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 11:54 AM
error while accessing math functions in kernel modules dypgrp Programming 0 01-19-2005 09:12 AM
accessing functions in kernel modules starbuck8968 Programming 5 12-14-2004 09:42 AM
Accessing Shell variable in awk script dileepkk Linux - General 1 10-07-2004 07:47 AM
Kernel Modules Error slacklinux Linux - Newbie 1 06-17-2004 12:14 AM


All times are GMT -5. The time now is 01:42 AM.

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