Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: 198710 on January 10, 2010, 02:44:54 pm

Title: Can anyone help introduce the compile strategy of such linux module with CB?
Post by: 198710 on January 10, 2010, 02:44:54 pm
Code
#define MODULE
#include <linux/module.h>

int init_module(void)
{
    printk("<1>Hello World!\n");
    return 0;
}

void cleanup_module(void)
{
    printk("<1>Goodbye!\n");
}

Is there any settings for this sample code in "build-option" or "properties"?
Title: Re: Can anyone help introduce the compile strategy of such linux module with CB?
Post by: koso on January 10, 2010, 04:37:56 pm
I think there is no integrated support. You will have to create custom Makefile, and configure C::B project to use it instead of standard build practice. Also there is posibility to add some post-compile scripts, which can install this module.

Also you will have to set search directories, so the code-completion plugin can find those kernel header files and parse them for symbols.