lkml.org 
[lkml]   [2002]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: can't include headers
Date

gndutm@netscape.net said:
> I need to write a device driver under linux. I am using slackware
> linux kernel 2.4.18. I have problem to include headers, here is some
> of my code:

> #define __KERNEL__
> #include <linux/config.h> (ok)

> #ifdef CONFIG_MODVERSIONS
> #define MODVERSIONS
> #include <linux/modversions.h> (ok)
> #endif

No, this is not OK. Add a simple Makefile like the normal kernel ones
and do something like
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd`

It's the only way to get the correct gcc options &c.

--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.043 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site