ChinaUnix.net
相关文章推荐:

undefined reference to setupterm

为什么我编译总是会出现这样的问题,也在google 八毒,搜了很多都是没有解决问题; g++ -o main main.cpp /tmp/cc0i2cum.o(.text+0x14c): In function `main': : undefined reference to `GDK::CFile::CFile(std::basic_string, std::allocator > const&)' /tmp/cc0i2cum.o(.text+0x1c6): In function `main': : undefined reference to `GDK::CFile::Name()' /tmp/cc0i2cum.o(.text+0x21a): In ...

by yyying - C/C++ - 2007-06-17 10:45:08 阅读(2811) 回复(6)

相关讨论

一直提示这个,但是代码没有用到这个函数。很困惑。

by foming - 嵌入式开发 - 2014-09-03 15:20:20 阅读(3852) 回复(16)

本帖最后由 o_unix 于 2013-02-22 12:06 编辑 大家好,我写个db2测试程序,template.sqc, 包含了头文件: sqlcli1.h 预编译成功, 编译命令: gcc -I/home/db2inst1/sqllib/include/ -L/home/db2inst1/sqllib/lib64/ template.c -o demo -ldb2 提示我好多这样的错误:/home/db2inst1/sqllib/lib64//libdb2.so: undefined reference to `gtraceGetFixedData2' 数据库是db2 9.7,操作系统是linux。 我还需要包含什么文件吗...

by o_unix - DB2 - 2013-02-21 16:38:50 阅读(1485) 回复(0)

本帖最后由 qinguan0619 于 2011-07-19 09:20 编辑 开始学习SICP,用scheme,下了Racket。按着练习做了几个,遇到问题如下:[code] > (not 1) not: expected either true or false; given 1 > (not #f) true > (not 'a) not: expected either true or false; given 'a > (define name "hhh") > name "hhh" > (string-length name) 3 > (string-set! name 0 #\g) reference to undefined identifier: string-set! > (define p ...

by qinguan0619 - Functional编程 - 2011-07-21 09:09:12 阅读(3967) 回复(5)

在gcc下用到数学函数,如sqrt。在gcc时要加上 [color="#ff0000"]-lm 参数,这样告诉编译器我要用到数学函数了 。 如: gcc a.c -o a -lm 首先要对编译有个了解,你写了一个程序,如果有头文件的话,就需要编译器指定这头文件对应的库文件,库文件一般都在/usr/lib目录下。 gcc默认指定的有几个库文件,比如libstd。 但是你所需要的math库不是gcc默认指定的,所以就需要你在编译的时候加上一个-lm选项。 -l是指定XXX库,m就指math库...

by yyy200819 - Linux文档专区 - 2010-01-27 19:05:14 阅读(1281) 回复(0)

gcc -g -O2 -o IDMS main.o IDMS_yys.o config.o daemon.o msg_between_servers_v4.o msg_with_asr_v4.o pack_process_v4.o serv_list_v4.o terminal_v4.o thread.o timer.o ../lib/librtm.a -L/usr/lib/mysql -lmysqlclient -lz -lpthread -L/usr/include -lreadline -L/home/yysjacky/IDMS_VTY/IDMS1 main.o: In function `sigtstp': /home/yysjacky/IDMS2_VTY/IDMS1/main.c:316: undefined reference to `vtysh_execute' mai...

by yysjacky - Linux环境编程 - 2009-01-12 21:25:42 阅读(6227) 回复(6)

buildserver -s TOUPPER -r UDB_XA -f "db2serv.c -I/home/db2inst1/sqllib/include" -o db2serv db2 v9.1 suse10.1 ...x86 everything has gone well but in the buildserver..it occurs the errors: 出现以下错误: /tmp/ccGbJy6A.o:(.data+0x108): undefined reference to `TOUPPER' collect2: ld returned 1 exit status CMDTUX_CAT:1832: ERROR: can't execute cc -I$TUXDIR/include -o db2serv BS-5093.c -L${TUX...

by xinxinhao - 中间件技术 - 2007-11-20 18:19:26 阅读(2547) 回复(0)

In function `dlfcn_load':dso_dlfcn.c:(.text+0x45): undefined reference to `dlopen' :dso_dlfcn.c:(.text+0xc4): undefined reference to `dlclose' :dso_dlfcn.c:(.text+0x102): undefined reference to `dlerror' 解决方法:在Makefile中的链接参数加上 -ldl就可以解决了 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/9861/showart_347220.html

by rainballdh - Linux文档专区 - 2007-07-26 14:41:16 阅读(3179) 回复(0)

我在Linux 下用 g++编译程序时,在链接阶段出现如下错误 /home/xjwang/yczhang/stl/testStack.cpp:9: undefined reference to `CStack::empty()' collect2: ld returned 1 exit status make: *** [testApp] Error 1、 makefile文件为: testApp: Stack.o testStack.o g++ -g Stack.o testStack.o -o testApp Stack.o: Stack.cpp Stack.h g++ -c Stack.cpp testStack.o: testStack.cpp Stack.h ...

by zyc911 - C/C++ - 2007-05-21 15:30:01 阅读(3958) 回复(3)

小弟以前从来都是vc下编程,不太习惯linux下的环境。我在redhat下有这样一段代码: #include #define BIT_NUM 6 int dist1(int a , int b) { int c; c = a^b; int i , k; k = 0; for( i = BIT_NUM-1 ; i >= 0 ; i--) { int p = (int)pow(2.0 , i); if(c / p == 1)k++; c = c % p; } return k; } int main() { int a , b ; int d; a = 16; b = 32; d = dist1( a ,b ); return 1; } 我用了math库...

by wangyanfeng05 - C/C++ - 2006-06-11 09:27:33 阅读(3149) 回复(8)

我将 Windows 下的程序移植到 Linux 下,Windows下的源程序是编译、连接都通过了的。在Linux下各个源文件都编译通过了,可是build时遇到问题,提示: undefined reference to 'auLsp' undefined reference to 'prvLpc' 函数一般都是要 声明、定义, 再调用 我是这么做的呀,问题会出在哪儿呢? 望大家指点,谢谢!

by Chennysky - C/C++ - 2005-06-29 16:35:15 阅读(2038) 回复(9)