Results 1 to 4 of 4
Hi,
I am new to linux kernel programming.
I created small program when i compiled i am getting the following error
undefined refrence to 'printk'
Please can some one suggest ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-20-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 3
Error:=undefined refrence to 'printk'
Hi,
I am new to linux kernel programming.
I created small program when i compiled i am getting the following error
undefined refrence to 'printk'
Please can some one suggest what could be the problem?
Here is is the program:
##############################
#include<linux/fs.h>
#include<linux/module.h>
#include<linux/kernel.h>
#include<linux/init.h>
MODULE_LICENCE("GPL")
static int initialization(void)
{
printk("Hello world\n");
}
static void clean_up(void)
{
printk("Clean up\n");
}
module_init(initialization);
module_exit(clean_up);
###############################
- 10-21-2008 #2Just Joined!
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 20
Module license spelling wrong
##############################
#include<linux/fs.h>
#include<linux/module.h>
#include<linux/kernel.h>
#include<linux/init.h>
static int initialization(void)
{
printk("Hello world\n");
return 0;
}
static void clean_up(void)
{
printk("Clean up\n");
}
MODULE_LICENSE("GPL")
module_init(initialization);
module_exit(clean_up)
- 10-21-2008 #3Just Joined!
- Join Date
- Oct 2008
- Posts
- 3
It was typing error when i posted, The error i was getting because of different reason i felt, when i analyzed.
I installed Fedora-6 Linux, where i need to install kernel-devel package separately.
This link talks about the installation package.
Fedora Project, sponsored by Red Hat
2) It was not having this problem with earlier version of Fedora.
Thank you for your help Venkat.
thanks
Sridhar
- 10-22-2008 #4Just Joined!
- Join Date
- Mar 2008
- Location
- Hyderabad
- Posts
- 20
if any version spelling doesn't change.
MODULE_LICENSE("GPL")
Correct spelling.
Any way you have compiling with out error right
ok
thanks,
--Venkatesh.


Reply With Quote
