请高手解决:Intel C++编译异常error LNK2019: 无法解析的外部符号
请高手解决:Intel C++编译错误error LNK2019: 无法解析的外部符号
我在WinXP中安装中VS2010,然后再安装了Intel Composer XE 2013,在cmd窗口中使用命令行进行编译,先运行了compilervars.bat 、compilervars_arch.bat、iclvars.bat这些环境设置,设为ia32,然后再命令icl进行编译,出现以下错误。
命令行是这样的:
icl -O2 bmc.cpp cp_pair.cpp zzn2.cpp big.cpp zzn.cpp ecn.cpp miracl.lib -o bmc_cp
错误信息如下:
zzn2.obj : error LNK2019: 无法解析的外部符号 _zzn2_qr,该符号在函数 "int __cdecl is_on_curve(class ZZn2 const &)" (?is_on_curve@@YAHABVZZn2@@@Z) 中被引用
zzn2.obj : error LNK2019: 无法解析的外部符号 _zzn2_sqrt,该符号在函数 "class ZZn2 __cdecl sqrt(class ZZn2 const &)" (?sqrt@@YA?AVZZn2@@ABV1@@Z) 中被引用
big.obj : error LNK2019: 无法解析的外部符号 _mround,该符号在函数 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl otfloat(class std::basic_ostream<char,struct std::char_traits<char> > &,class Big const &,int)" (?otfloat@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVBig@@H@Z) 中被引用
big.obj : error LNK2019: 无法解析的外部符号 _fmul,该符号在函数 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl otfloat(class std::basic_ostream<char,struct std::char_traits<char> > &,class Big const &,int)" (?otfloat@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVBig@@H@Z) 中被引用
big.obj : error LNK2019: 无法解析的外部符号 _fdiv,该符号在函数 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl otfloat(class std::basic_ostream<char,struct std::char_traits<char> > &,class Big const &,int)" (?otfloat@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVBig@@H@Z) 中被引用
bmc_cp.exe : fatal error LNK1120: 5 个无法解析的外部命令
而我在inux下使用以下命令却是能够正常编译链接的:
g++ -O2 bmc.cpp cp_pair.cpp zzn2.cpp big.cpp zzn.cpp ecn.cpp miracl.lib -o bmc_cp
请教高手,特别是使用过intel C++ 的朋友,在win xp中的出现的上面那些链接错误error LNK2019如何解决?
------解决思路----------------------
总是发现Path环境变量被某些软件安装时错误修改。比如带空格的目录名未加引号、带汉字的目录引起目录查找混乱等问题,严重影响系统查找可执行文件和dll。
编译此源代码,生成PathShortener.exe,然后在cmd窗口里面运行PathShortener.exe>path.txt,打开path.txt,手动将其内容拷贝粘贴覆盖修改‘我的电脑、属性、高级、环境变量、系统变量、Path、编辑、变量值’即可纠正设置错误的Path
http://download.****.net/detail/zhao4zhong1/2652343
------解决思路----------------------
未能正确引入连接库
我在WinXP中安装中VS2010,然后再安装了Intel Composer XE 2013,在cmd窗口中使用命令行进行编译,先运行了compilervars.bat 、compilervars_arch.bat、iclvars.bat这些环境设置,设为ia32,然后再命令icl进行编译,出现以下错误。
命令行是这样的:
icl -O2 bmc.cpp cp_pair.cpp zzn2.cpp big.cpp zzn.cpp ecn.cpp miracl.lib -o bmc_cp
错误信息如下:
zzn2.obj : error LNK2019: 无法解析的外部符号 _zzn2_qr,该符号在函数 "int __cdecl is_on_curve(class ZZn2 const &)" (?is_on_curve@@YAHABVZZn2@@@Z) 中被引用
zzn2.obj : error LNK2019: 无法解析的外部符号 _zzn2_sqrt,该符号在函数 "class ZZn2 __cdecl sqrt(class ZZn2 const &)" (?sqrt@@YA?AVZZn2@@ABV1@@Z) 中被引用
big.obj : error LNK2019: 无法解析的外部符号 _mround,该符号在函数 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl otfloat(class std::basic_ostream<char,struct std::char_traits<char> > &,class Big const &,int)" (?otfloat@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVBig@@H@Z) 中被引用
big.obj : error LNK2019: 无法解析的外部符号 _fmul,该符号在函数 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl otfloat(class std::basic_ostream<char,struct std::char_traits<char> > &,class Big const &,int)" (?otfloat@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVBig@@H@Z) 中被引用
big.obj : error LNK2019: 无法解析的外部符号 _fdiv,该符号在函数 "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl otfloat(class std::basic_ostream<char,struct std::char_traits<char> > &,class Big const &,int)" (?otfloat@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVBig@@H@Z) 中被引用
bmc_cp.exe : fatal error LNK1120: 5 个无法解析的外部命令
而我在inux下使用以下命令却是能够正常编译链接的:
g++ -O2 bmc.cpp cp_pair.cpp zzn2.cpp big.cpp zzn.cpp ecn.cpp miracl.lib -o bmc_cp
请教高手,特别是使用过intel C++ 的朋友,在win xp中的出现的上面那些链接错误error LNK2019如何解决?
------解决思路----------------------
总是发现Path环境变量被某些软件安装时错误修改。比如带空格的目录名未加引号、带汉字的目录引起目录查找混乱等问题,严重影响系统查找可执行文件和dll。
编译此源代码,生成PathShortener.exe,然后在cmd窗口里面运行PathShortener.exe>path.txt,打开path.txt,手动将其内容拷贝粘贴覆盖修改‘我的电脑、属性、高级、环境变量、系统变量、Path、编辑、变量值’即可纠正设置错误的Path
http://download.****.net/detail/zhao4zhong1/2652343
------解决思路----------------------
未能正确引入连接库