本帖最后由 zqy1005 于 2010-06-16 17:48 编辑 今天在网上看到这样一段話 是 mian()函数执行完毕以后,能否再执行一段代码? 请各位指教了, 能 还是 不能呢? 如果能的 話 要怎样做呢, 最好能給出例子。 谢谢了
Hi,
遇到个奇怪的问题,采用g++ -share选项时,程序还没进入main时就发生了段错误,有大神指点下么。。
代码如下,其中,aaaa没有输出。 PS:如果不用-share时,程序可以正常执行。
编译选项 g++ -shared -o./test main.cpp[code]#include
执行一个可执行文件 main.sh, ./main.sh 可以执行,而直接main.sh不行,为什么啊?
本帖最后由 zqy1005 于 2010-06-16 17:48 编辑 今天在网上看到这样一段話 是 mian()函数执行完毕以后,能否再执行一段代码? 请各位指教了, 能 还是 不能呢? 如果能的 話 要怎样做呢, 最好能給出例子。 谢谢了
#include
1. Add to .init section, be called in .init before __do_global_ctors_aux CODE: int oinit(void) { __asm__ (".section .init \n" "bl oinit \n\t" /* for arm, or "call oinit \n\t" for x86 ".section .text"); /* you can also put this out of the function */ printf("In o init by insert to .init section"); } 2. Add to .ctors section, will be called by function __do_global_ctor...
本帖最后由 hededisanan00 于 2012-08-17 10:22 编辑 开发的GTK工具在执行gtk_main_quit后有的机子终端打印如下错误: An IOException occurred at scim_bridge_messenger_send_message () Failed to send a message at scim_bridge_client_deregister_imcontext () Failed to deregister an IMContext The messenger is now down The messenger is now down The messenger is now down The messenger is now down The messenge...