由买买提看人间百态

topics

全部话题 - 话题: ddebug
(共0页)
w****g
发帖数: 206
1
【 以下文字转载自 Programming 讨论区 】
发信人: wooing (woo), 信区: Programming
标 题: 求助:有用portland compiler 的么?
发信站: BBS 未名空间站 (Mon Nov 1 21:42:17 2010, 美东)
老板让我试着用portland的compiler build code,以前一直用intel的,这两个之间的
flag是怎么对应的啊?
CC=icc
CXX=icpc
LINK=icpc
AR="/usr/bin/ar cru"
RANLIB=/usr/bin/ranlib
DEPENDFLAG="-MM"
REL_FLAGS="-fPIC"
SO_LIBS=""
CPPFLAGS="-Wall"
OPT_CPPFLAGS="-O2 -DNDEBUG"
DBG_CPPFLAGS="-O0 -g -DDEBUG"
DO_64BITS=1
ARCH_DIR="$canonical_name_guess"
SYS_LIBS="-i-static"
;;
... 阅读全帖
w****g
发帖数: 206
2
做了以下修改,还是不工作,有牛人帮看看么?
CC=pgcc
CXX=pgCC
LINK=pgCC
AR="/usr/bin/ar cru"
RANLIB=/usr/bin/ranlib
# DEPENDFLAG="-MM"
DEPENDFLAG="-MM"
# REL_FLAGS="-fPIC"
REL_FLAGS=""
SO_LIBS=""
# CPPFLAGS="-Wall"
CPPFLAGS="Minform=warn"
# OPT_CPPFLAGS="-O3 -xW -DNDEBUG"
OPT_CPPFLAGS="-O3"
# DBG_CPPFLAGS="-O0 -g -DDEBUG"
DBG_CPPFLAGS="-O0"
DO_64BITS=1
ARCH_DIR="$canonical_name"
# SYS_LIBS="-i-static"
SYS_LIBS="-Bstatic"
;;
y***d
发帖数: 2330
3
来自主题: Linux版 - 快速替换文件里面的特定值
#ifndef DEBUG
#define DEBUG 0
#endif
gcc -DDEBUG=1 ...
or you can put it into a universal header file, and
gcc -Iheader.h ....
I don't think it is wise to change all the files again and again
y***d
发帖数: 2330
4
来自主题: Linux版 - 快速替换文件里面的特定值
#ifndef DEBUG
#define DEBUG 0
#endif
gcc -DDEBUG=1 ...
or you can put it into a universal header file, and
gcc -Iheader.h ....
I don't think it is wise to change all the files again and again
w****g
发帖数: 206
5
来自主题: Programming版 - 求助:有用portland compiler 的么?
老板让我试着用portland的compiler build code,以前一直用intel的,这两个之间的
flag是怎么对应的啊?
CC=icc
CXX=icpc
LINK=icpc
AR="/usr/bin/ar cru"
RANLIB=/usr/bin/ranlib
DEPENDFLAG="-MM"
REL_FLAGS="-fPIC"
SO_LIBS=""
CPPFLAGS="-Wall"
OPT_CPPFLAGS="-O2 -DNDEBUG"
DBG_CPPFLAGS="-O0 -g -DDEBUG"
DO_64BITS=1
ARCH_DIR="$canonical_name_guess"
SYS_LIBS="-i-static"
;;
象以上这些,除了吧icc改成pgcc,icpc改成pgCC外,其他的怎么修改啊?
g*********s
发帖数: 1782
6
来自主题: Programming版 - in-class static member question
The following code has compilation errors if "-DDEBUG" is not specified.
In function `StripePainter::init_tab(std::basic_string std::char_traits, std::allocator >)':
inclass_static.cpp:(.text+0xb): undefined reference to
`StripePainter::colorset'
inclass_static.cpp:(.text+0x1b): undefined reference to
`StripePainter::orig_color'
inclass_static.cpp:(.text+0x23): undefined reference to
`StripePainter::colorset'
inclass_static.cpp:(.text+0x58): undefined reference to
`StripePainte... 阅读全帖
s********e
发帖数: 158
7
我用的是icpc 11.1,调试是用idb在gdb模式下,我应该加-O0吗
icpc -w -I. -ansi -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -DDEBUG
-Wall -Wformat -Woverloaded-virtual -DUSE_IML -D_LINUX_ -DSYSV -DSTL -
DCGNS -DDTF -c foo.cpp -o foo.obj
p***o
发帖数: 1252
8
你先用g++试试看有没有同样的问题。

DDEBUG
-
g*******n
发帖数: 139
9
I can't find a binary version for this and compile the source code only got
errors.
The version I download is mrouted3.8.2-src.tar.gz.
The errors are below:
When I type the command below:
gcc -I ../snmplib -DDEBUG -DMROUTED -DHAVE_CONFIG_H -c -o snmpd.o snmpd.c
The error is:
Infile included from snmpd.c:39:
/usr/included/stdio.h:216 parse error before '0'
make[1]: *** [snmpd.o] Error 1
Who have installed it before, please help. Tell us where can find a good version
can use smoothly.
c*****e
发帖数: 32
10
来自主题: Unix版 - [转载] 求救
这其实是选项 -D 作用是 Define macro macro with the string `1' as its
definition
一般人在程序里边加一些 debug 的 code block,用 "#ifdef DEBUG" 和 "#endif" 括起

当编译时想要包含DEBUG 的 code 就用编译选项 -DDEBUG
(共0页)