ChinaUnix.net
相关文章推荐:

linux 为什么编译

源码: #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"); } 编译出错信息: In file included from /usr/include/asm-i486/local.h:4, from /usr/include/asm/local.h:8, from /usr/include/linux/module.h:20, from module.c:4: /usr/include/lin...

by xltao - 内核源码 - 2007-09-24 14:14:04 阅读(7376) 回复(24)

相关讨论

下面的代码在unix下编译没有问题,而在linux编译出错,不知道为什么? ---------------------------------------------------- #include #include #include class okcl{ okcl() {}; private: int lok; }; template void Release(std::vector& container) { std::vector::iterator it = container.begin(); } 错误信息: ./inc/1.h: In function 'void ...

by windyloft - C/C++ - 2005-12-28 08:35:22 阅读(1156) 回复(3)

本帖最后由 qihuasoft 于 2011-06-10 11:46 编辑 [code] // hellomod.c // hello world driver for linux 2.6 #include <linux/module.h> #include <linux/kernel.h> #include <linux/init.h> #MODULE_LICENCE("GPL"); //get rid of taint message static int __init lkp_init( void ) { printk("<1>Hello,World! from the kernel space...\n"); return 0; } static void __exit lkp_cleanup( void ) { printk("<1>G...

by qihuasoft - Linux环境编程 - 2011-06-10 11:45:12 阅读(2803) 回复(0)

我们经常看到讲解C语言编译过程的文章,都在说hello.c经过cpp生成hello.i,经过ccl生成hello.s,可是我在整个系统搜索ccl也没有,gcc编译正常。 我用的红帽企业版5.4 谁知道为什么没有ccl了???

by 源方 - C/C++ - 2010-11-21 19:10:10 阅读(5183) 回复(3)

gcc报错 /tmp/ccu7jTKi.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' 改g++就可以了 是APUE的一个示例程序

by wishel - C/C++ - 2008-11-25 21:54:35 阅读(3229) 回复(6)

如题,请高手仔细讲解一下。 linux OS是否对于在Win下可以执行的程序不能解释? 如果有一天linux可以解释Win的exe了,那么是不是就不存在分别编译的问题? 那么是不是java的虚拟机也就没有什么用处了? 为什么各家OS不作成统一对于可以执行的文件的支持呢?省得开发这么费劲!:shock: me问题儿童呵呵!

by lnfxcf - C/C++ - 2006-12-05 14:12:06 阅读(6377) 回复(37)

linux中,运用gcc编译c程序时,为什么找不到 ourhdr.h ? 说ourhdr.h不存在,不知道,怎么解决。

by yueming - 程序开发 - 2004-10-08 14:57:53 阅读(923) 回复(3)

linux中,运用gcc编译c程序时,为什么找不到 ourhdr.h ? 说ourhdr.h不存在,不知道,怎么解决。

by yueming - Linux环境编程 - 2004-10-08 14:57:53 阅读(2016) 回复(3)

我在linux下执行java 类名 ,总是出现下面的错误。 Exception in thread "main" java.lang.NoClassDefFoundError:类名 类名大小写都和程序里面的一样。我怀疑是我的环境设置有问题,我是在/root/.bash_profile文件里设置java_home,classpath和path的。现在编译能够通过,不知道运行程序还要设置什么?

by starfist - Java - 2003-06-16 08:13:44 阅读(2257) 回复(3)

我觉得应该是我的Java环境没有设好,但是编译却能够成功。能告诉我正确的配置吗?谢谢!

by starfist - Linux论坛 - 2003-06-12 10:06:08 阅读(612) 回复(0)

我觉得应该是我的Java环境没有设好,但是编译却能够成功。能告诉我正确的配置吗?谢谢!

by starfist - Linux环境编程 - 2003-06-12 10:06:08 阅读(1545) 回复(0)