为什么我编译总是会出现这样的问题,也在google 八毒,搜了很多都是没有解决问题;
g++ -o main main.cpp
/tmp/cc0i2cum.o(.text+0x14c): In function `main':
: undefined reference to `GDK::CFile::CFile(std::basic_string
by yyying - C/C++ - 2007-06-17 10:45:08 阅读(2816) 回复(6)
本帖最后由 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。 我还需要包含什么文件吗...
本帖最后由 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 ...
在gcc下用到数学函数,如sqrt。在gcc时要加上 [color="#ff0000"]-lm 参数,这样告诉编译器我要用到数学函数了 。 如: gcc a.c -o a -lm 首先要对编译有个了解,你写了一个程序,如果有头文件的话,就需要编译器指定这头文件对应的库文件,库文件一般都在/usr/lib目录下。 gcc默认指定的有几个库文件,比如libstd。 但是你所需要的math库不是gcc默认指定的,所以就需要你在编译的时候加上一个-lm选项。 -l是指定XXX库,m就指math库...
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...
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...
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
我在Linux 下用 g++编译程序时,在链接阶段出现如下错误
/home/xjwang/yczhang/stl/testStack.cpp:9: undefined reference to `CStack
小弟以前从来都是vc下编程,不太习惯linux下的环境。我在redhat下有这样一段代码:
#include
我将 Windows 下的程序移植到 Linux 下,Windows下的源程序是编译、连接都通过了的。在Linux下各个源文件都编译通过了,可是build时遇到问题,提示: undefined reference to 'auLsp' undefined reference to 'prvLpc' 函数一般都是要 声明、定义, 再调用 我是这么做的呀,问题会出在哪儿呢? 望大家指点,谢谢!