由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - [合集] 请问-fno-implicit-templates的用处
相关主题
C++ 的 问题question about const reference
One question in C programming[合集] 关于template和inheritance的问题请教
Re: VC里面的stl支持是不是很弱?谁来解释一下这个是compiler问题吗?
请叫一个 template class constructor 的问题关于Makefile的一个问题
compile errorquestion for C++ constant
C++ templatea simple question about constructor
[合集] 请问makefile里双冒号什么意思?[合集] MSVS.Net里面怎么才能显示出每一次compile的完全命令?
question regarding const functionPython problem on 64 bit Linux
相关话题的讨论汇总
话题: fno话题: templates话题: implicit话题: 用处话题: double
进入Programming版参与讨论
1 (共1页)
b***y
发帖数: 2799
1
☆─────────────────────────────────────☆
sunboy (雷欧) 于 (Sun Oct 9 23:32:30 2005) 提到:
请问g++的-fno-implicit-templates 有什么用处?
我需要用到别人的一段code,他的例程的makefile里面compile
时加上了这个option,make成功。但是我自己写的新程序里要用到
template,加上这个option以后link会出错,比如程序里要调用complex的sqrt,就显示
main.o(.text+0x31): In function `f(double const&)':
undefined reference to `std::complex std::sqrt(std::complex<
double> const&)'
去掉-fno-implicit-templates就没问题,编译运行成功。
请问这个选项具体干什么用,不知道去掉这个选项有什么后果,
现在程序还很简单,所以看不出影响。
man里说
Never emi
1 (共1页)
进入Programming版参与讨论
相关主题
Python problem on 64 bit Linuxcompile error
一个C++ template的问题C++ template
c++标准函数传递一问[合集] 请问makefile里双冒号什么意思?
C++ template problemquestion regarding const function
C++ 的 问题question about const reference
One question in C programming[合集] 关于template和inheritance的问题请教
Re: VC里面的stl支持是不是很弱?谁来解释一下这个是compiler问题吗?
请叫一个 template class constructor 的问题关于Makefile的一个问题
相关话题的讨论汇总
话题: fno话题: templates话题: implicit话题: 用处话题: double