由买买提看人间百态

topics

全部话题 - 话题: undefined
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
d****n
发帖数: 1241
1
undefined behavior可能是C里边最"邪恶"的一个东西了。。。
听到过一个很有意思的undefined behavior是关于整数溢出的,
signed integer overflow是一个常见的undefined behavior.
但是unsigned integer在某些情况下也会导致undefined behavior,
比如两个unsigned short相加,如果ABI规定sizeof(unsigned short)是16,
sizeof(int)是32, 那么C标准里的integer promotion规则会先把
unsigned short变成signed int, 然后就存在integer overflow的可能性了。呵呵
w*****j
发帖数: 49
2
【 以下文字转载自 Programming 讨论区 】
发信人: woshimj (woshimj), 信区: Programming
标 题: /usr/bin/ld: Undefined symbols:
发信站: BBS 未名空间站 (Fri Apr 9 11:51:19 2010, 美东)
Hi, everybody, I'm trying to use gcc to compile a program on my mac. It use
FLTK library. And when i type "g++ -o scratch scratch.c++". it gives the
error:
/usr/bin/ld: Undefined symbols:
Fl::run()
Fl_Widget::Fl_Widget(int, int, int, int, char const*)
Fl_Widget::~Fl_Widget()
Fl_Window::show()
Fl_Window::Fl_Window(int, int, char const*)
Fl_Window:
r****t
发帖数: 10904
3
奇怪,在连接的时候遇到如下错误,-lstdc++ 也没法成功,怎么办?
undefined reference to `operator<<(std::basic_string char>, std::allocator >&, int)'
undefined reference to `operator<<(std::basic_string char>, std::allocator >&, int)'
collect2: ld returned 1 exit status
q****m
发帖数: 177
4
来自主题: Programming版 - 这个是undefined的吗?
int f()
{
static int i = 0;
i++;
return i - 1;
}
int main()
{
int a[4] = {4, 3, 2, 1};
a[f()] = a[f()] + 10; // undefined ?
a[f()] += 10; // undefined ?
}
~
b****t
发帖数: 29
5
【 以下文字转载自 EE 讨论区 】
发信人: bsaint (bsaint), 信区: EE
标 题: 关于natbib里面的author undefined
发信站: BBS 未名空间站 (Mon Oct 29 19:27:15 2007)
我用
\usepackage{natbib}
但是当用\citep的时候,她会报告author undefined for citation 'xxx'
谁知道怎么解决这个问题,谢谢。
v****s
发帖数: 1112
6
sty和tex文件在此:
http://nips.cc/PaperInformation/StyleFiles
sty file:
nips10submit_e.sty: style file for LaTeX 2e (preferred)
尝试编译他们提供的tex 和 sty files,但是出错。
我用的是miktex 2.9, ide 用的是texniccenter , 在lyx 1.8.6也出现同样的错误:
undefined control sequence
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
十分感谢!!
l*********r
发帖数: 674
7
来自主题: JobHunting版 - 这个为啥是undefined behavior?
void f(void)
{
char * p = "wikipedia";
p[0] = 'W'; // undefined behaviour
}
c**********g
发帖数: 304
8
来自主题: Database版 - Undefined function 'Date' in Expression
重装了一下客户端的access,然后连接到服务器,就出现这条信息Undefined function
'Date' in Expression,所有和query有关的选项都不能用。请大家帮帮忙。谢谢了!
t******1
发帖数: 334
9
大家有在C里面call lapack subroutine么?
我在学校的超级计算机上编译,include跟linker的flag都设好了,但是还是出现
undefined reference to这个错误,不知道哪儿出问题了,有人知道么?
google结果,据说可能是一个libg2c的库的问题,但我一个新手,啥都不懂,能知道
linker已经觉得很牛鼻了,这个问题对我而言很棘手。
希望懂的同志能帮一下手。谢谢。
p****s
发帖数: 32405
10
undefined reference to what?
是不是某个函数/变量没定义就在用?
w*s
发帖数: 7227
11
Can't call method "header" on an undefined value at /.../login.pl line 19.
# process the form
if($usr eq "demo" and $pwd eq "demo")
{
$session = new CGI::Session();
print $session->header(-location=>'index1.pl');
}
This is the sample i copied from web, what does this error mean pl ?
file is at
http://www.perlguru.com/gforum.cgi?do=post_attachment;postatt_i
y****e
发帖数: 23939
12
来自主题: Programming版 - Help: undefined symbol
噢,nm的结果果然是U:
U _ZTIN8wustl_mm13Visualization8RendererE
U的意思是“This symbol is undefined”。到底是怎么回事呢?
如果我用nm libGORGON.so | grep blahblah
就会什么也不返回,返回U是指有declaration,没有definition吗?
非常感谢你,thrust,最近我的很多问题都能从你那里得到答案。
w*****j
发帖数: 49
13
来自主题: Programming版 - /usr/bin/ld: Undefined symbols:
Hi, everybody, I'm trying to use gcc to compile a program on my mac. It use
FLTK library. And when i type "g++ -o scratch scratch.c++". it gives the
error:
/usr/bin/ld: Undefined symbols:
Fl::run()
Fl_Widget::Fl_Widget(int, int, int, int, char const*)
Fl_Widget::~Fl_Widget()
Fl_Window::show()
Fl_Window::Fl_Window(int, int, char const*)
Fl_Window::~Fl_Window()
vtable for Fl_Box
collect2: ld returned 1 exit status
Anybody gets any suggestions? Thanks.
w*****j
发帖数: 49
14
来自主题: Programming版 - /usr/bin/ld: Undefined symbols:
Hi,I used -lfltk and it sort of change the error message:
Undefined symbols:
_AECountItems
_AECreateDesc
etc.
Am I supposed to link to another library?
s********z
发帖数: 5411
15
我有一个从CCD camera采集图像的小程序,以前是用MSVC,没什么问题,现
在为了把界面变得漂亮点改成Qt+mingw的。
在用library的时候出现了undefined reference to "func" 的错误,
用的是national instrument的library, niimaq.h.
不知道该怎么办,大家请帮帮忙。
多谢
X****r
发帖数: 3557
16
来自主题: Programming版 - Is this function's behavior undefined?
yes, undefined
never return a reference to a temporary
x******a
发帖数: 6336
17
装了一个quantlib在mac os x上,然后运行那个example,结果得到下面一堆。请教应
该link或者编译?
谢谢!
instruction在这里:
http://quantlib.org/install/macosx.shtml
run example
g++ -I/opt/local/include/ -I/opt/local/include/boost BermudanSwaption.cpp
-o bermudanswaption -L/opt/local/lib/ -lQuantLib
以后的error:
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
"vtable for boost::unit_test::unit_test_log_t", referenced from:
boost::unit_test::unit_test_log_t::unit_test_log_t()in ccL... 阅读全帖
d****n
发帖数: 1241
18
来自主题: Programming版 - 这个是undefined的吗?

我觉得是unspecified behavior, evaluation order of LHS and RHS
is unspecified. f()的"return i-1"之后有一个sequence point, 所以不存在两个
sequence points之间存在多个writes的问题。
这里我认为是正确的
不过这个程序里,存在一个undefined behavior, main函数必须return一个int,否则
是UB.
d****i
发帖数: 4809
19
来自主题: Programming版 - 这个是undefined的吗?
第一个是undefined behavior, 第二个不是。
http://en.wikipedia.org/wiki/Undefined_behavior#Examples_in_C_a
l*8
发帖数: 37
20
装了miktex, auctex
c-c c-c undefine啊
s**9
发帖数: 207
21
来自主题: TeX版 - 怎样 undefine 一个 newcommand
documentclass 用了一个指定的模板, 里面定义了algorithm:
\newtheorem{algorithm}[theorem]{Algorithm}.
正文里又需要用algorithm2e的algorithm. 于是就提示说command algorithm already
defined.
有没有什么办法把模板里的algorithm给"undefine"掉?
d**********o
发帖数: 1321
22
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
hw3b c-.y file
上面这一楼贴了载止hw3b deadline时我match的结果(也就是老师可以以这些不match
的ERROR为借口不给后来我补上的成绩),但是因为当时我还是没有写完,后来感恩节
期间就接着又写了一些,而且hw5是based on hw3 & hw3b的基础上(当我hw5是based
on更好的hw3的结果时,我应该可以得更多的分吧)。
hw4因为写得比较顺利,就不曾保留任何交上去作业的output,没有什么一目了然的结
果是我可以贴在这里的。原本我是想要把自己最的一次作业hw5贴出来的,但那已经是
一个完整的compiler,而且以后我还需要用自己的course project来找工作,所以一定
就不贴最终结果了。那就贴一个hw3b的c-.y文件吧,它集中的hw1、hw2、hw3、 hw3b的
结果,是我自己hw3b *.y文件的最完整版本。这些作业里面也有很多机关一一人为增加
的难度,比如那六七个IO相关的function,不仅traverse tree、build syntax tree的
时候会成为一个考点(把它们作为一个node连在syntax... 阅读全帖
d**********o
发帖数: 1321
23
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
hw3b c-.y file
上面这一楼贴了载止hw3b deadline时我match的结果(也就是老师可以以这些不match
的ERROR为借口不给后来我补上的成绩),但是因为当时我还是没有写完,后来感恩节
期间就接着又写了一些,而且hw5是based on hw3 & hw3b的基础上(当我hw5是based
on更好的hw3的结果时,我应该可以得更多的分吧)。
hw4因为写得比较顺利,就不曾保留任何交上去作业的output,没有什么一目了然的结
果是我可以贴在这里的。原本我是想要把自己最的一次作业hw5贴出来的,但那已经是
一个完整的compiler,而且以后我还需要用自己的course project来找工作,所以一定
就不贴最终结果了。那就贴一个hw3b的c-.y文件吧,它集中的hw1、hw2、hw3、 hw3b的
结果,是我自己hw3b *.y文件的最完整版本。这些作业里面也有很多机关一一人为增加
的难度,比如那六七个IO相关的function,不仅traverse tree、build syntax tree的
时候会成为一个考点(把它们作为一个node连在syntax... 阅读全帖
c******x
发帖数: 1197
24
来自主题: Tianjin版 - 新看来的天津人气餐厅33所
http://mp.weixin.qq.com/mp/appmsg/show?__biz=MjM5MzgzOTUxMQ==&a
天津:人气餐厅大推荐33家!

口袋厨房热门微信请逐一回复下列关键词即可查看:咳嗽、焖饭、神器、慎入、剩菜、
致癌、养生粥、素菜、饺子、早餐、美容、吃货、好色…哈哈。
一、飛HOUSE
推荐:土豆沙拉 法式炸鱼
河西区黑牛城道五一阳光皓日园底商254号
人均60块钱左右 这是一个无比欢型的夫妻店环境没的说,装修小有情调,座椅很舒适。
二 益民餐厅
推荐:黑蒜子牛肉粒 酱爆洋白菜
和平区哈尔滨道新华路交口
人均消费30元左右 传统津菜,老板娘很接地气,店内菜都是走量大实惠路线的,店不
起眼,人气却很高。
三、饭盆儿
南开区鞍山西道265号时代数码广场科贸国际公寓1009室(近中医药大学第一附属医院)
是租的公寓改的,主要做外卖,虽然地方小,但竟是慕名而来吃这一口——店内的榴莲
匹萨。
四 隐于闹市的清新小店——那嘉小馆
如今约朋友聊天,或是吃饭,眼大肚子小不再愿意走进人声鼎沸的酒楼,即便口味完美
。街头巷尾,清新风格的小馆,不用面积多大,安静清新,餐品精致... 阅读全帖
P***y
发帖数: 2885
a**U
发帖数: 115
26
来自主题: JobHunting版 - 一个C++的问题!
多谢大牛!
1) undefined behaviour may lead to any result, including running
successfully, segfault, or formating your hard drive.
2) undefined behaviour may lead to any result, including running
successfully, segfault, or formating your hard drive.
3)undefined behaviour may lead to any result, including running
successfully, segfault, or formating your hard drive.
4)undefined behaviour may lead to any result, including running
successfully, segfault, or formating your hard drive.
5)
undefined behavio... 阅读全帖
p*******n
发帖数: 4824
27
来自主题: NewJersey版 - test
make[1]: Entering directory `/home/yechaox/yechaox/yechaox_test'
mitbbspost -DHAVE_CONFIG_H -I. -I. -I.. -I../mitbbspost -I../libsrc
-Df2cWatering -g -O2 -c -o test_get.o test_get.W
mitbbspost -DHAVE_CONFIG_H -I. -I. -I.. -I../mitbbspost -I../libsrc
-Df2cWatering -g -O2 -c -o test_put.o test_put.W
mitbbspost -DHAVE_CONFIG_H -I. -I. -I.. -I../mitbbspost -I../libsrc
-Df2cWatering -g -O2 -c -o watering_error.o watering_error.W
mitbbspost -DHAVE_CONFIG_H -I. -I. -I.. -I../mitbbspost -I../libs... 阅读全帖
b*****n
发帖数: 2324
28
来自主题: Military版 - est