Latest LQ Deal: Linux Power User Bundle
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, 01: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, 04:23 AM   #2
LQ Newbie
Registered: Jan 2005
Posts: 11

Original Poster
Rep: Reputation: 0
Old 01-16-2005, 05: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, 07: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 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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:33 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