plplot在vs2010下编译出错
配置环境为: vs2010 + ivf XE2013+plplot5.10.0+Cmake2.8.12用cmake生成sln,然后打开sln后install,出现下面这个错误,主要是在链接产生plplotf95d.dll时出错,就差最后这一步了,请专家给看看
1>------ 已启动生成: 项目: ZERO_CHECK, 配置: Debug Win32 ------
2>------ 已启动生成: 项目: deltaT.h_built, 配置: Debug Win32 ------
3>------ 已启动生成: 项目: tai-utc.h_built, 配置: Debug Win32 ------
4>------ 已启动生成: 项目: plhershey-unicode.h_built, 配置: Debug Win32 ------
5>------ 已启动生成: 项目: plplotf95d, 配置: Debug Win32 ------
5>Compiling manifest to resources...
5>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
5>Copyright (C) Microsoft Corporation.All rights reserved.
5>Linking...
5>Microsoft (R) Incremental Linker Version 10.00.30319.01
5>Copyright (C) Microsoft Corporation.All rights reserved.
5>/OUT:D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.dll
5>/VERSION:11.0
5>/LIBPATH:D:\Libraries\plplotinstall_vs\dll\Debug
5>/DEF:plplotf95_ifort.def
5>/MANIFEST
5>/MANIFESTFILE:D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.dll.intermediate.manifest
5>"/MANIFESTUAC:level='asInvoker' uiAccess='false'"
5>/DEBUG
5>/PDB:D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.pdb
5>/DLL
5>user32.lib
5>plplotf95cd.lib
5>plplotd.lib
5>csirocsa.lib
5>qsastime.lib
5>plf95demolibd.lib
5>mem.lib
5>null.lib
5>ps.lib
5>svg.lib
5>xfig.lib
5>/machine:X86
5>/debug
5>/INCREMENTAL
5>plplotf95d.dir\Debug\strutil.obj
5>plplotf95d.dir\Debug\sfstubsf95.obj
5>plplotf95d.dir\Debug\configurable.obj
5>D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.dll.embed.manifest.res
5> 正在创建库 D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.lib 和对象 D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.exp
5>sfstubsf95.obj : error LNK2019: 无法解析的外部符号 _PLSETOPT7,该符号在函数 _PLPLOTP_mp_PLSETOPT 中被引用
5>sfstubsf95.obj : error LNK2019: 无法解析的外部符号 _PLSDEV7,该符号在函数 _PLPLOTP_mp_PLSDEV 中被引用
5>sfstubsf95.obj : error LNK2019: 无法解析的外部符号 _PLGDEV7,该符号在函数 _PLPLOTP_mp_PLGDEV 中被引用
。。。。(若干类似错误)
5>configurable.obj : error LNK2019: 无法解析的外部符号 _PLPARSEOPTS7,该符号在函数 _PLPARSEOPTS 中被引用
5>D:\Libraries\plplotinstall_vs\dll\Debug\plplotf95d.dll : fatal error LNK1120: 83 个无法解析的外部命令
5>
5>Build log written to"file://D:\Libraries\plplotinstall_vs\bindings\f95\plplotf95d.dir\Debug\BuildLog.htm"
5>plplotf95d - 84 error(s), 0 warning(s)
========== 生成: 成功 4 个,失败 1 个,最新 7 个,跳过 0 个 ==========
PLSETOPT7,PLSDEV7 这些函数找不到。
因为没用过这个 plplot 所以具体也帮不上你,自己在工程内搜索一下吧。看看是什么东西,在什么位置实现的。 感谢群主回复。。。我又检查了下,发现PLSETOPT7是在c文件中的函数,那该怎么办那,要在fortran中调用c的子程序 初步估计是接口没有弄好,Fortran默认的函数接口都是函数名大写的,即你的错误提示,而C的接口则是可变的,需要自己去查看他的接口声明
你去查下你的plplot是否有些宏可以定义这些东西,或者你把整个库发到我qq邮箱(328069416@qq.com) 我把plplot的源文件和cmake后的vs项目文件发给你了,静候佳音~~ plplot官网为:http://plplot.sourceforge.net/
vs配置参考:http://www.miscdebris.net/plplot_wiki/index.php?title=Configure_PLplot_for_the_Visual_Studio_IDE mangix2010 发表于 2014-5-8 09:46
我把plplot的源文件和cmake后的vs项目文件发给你了,静候佳音~~
我装的VS2012+IVF2013,重新下了个CMAKE,重新生成工程后编译跟楼主一样的错误
查看代码后连接关系后确定为工程:plplotf95cLY_Debugd有问题,其接口关系为STDCALL,其定义了IVF对应的接口,只需修改为IVF对应的接口
做如下修改:修改plplotf95cLY_Debugd工程的属性:
其编译结果为:
仍然有7个工程有些小错误,不知是不是我的编译器是VS2012的缘故
这个是语法错误,一时难以查出来,你试试你自己的吧
http://www.miscdebris.net/plplot_wiki/index.php?title=Configure_PLplot_for_the_Visual_Studio_IDE
上也说了,这里存在一些错误,等待下个release吧
Intel Fortran
If you use Intel Fortran, the solution/project files may cause errors when building. These affect only the Fortran libraries and examples. It is due to a small bug in CMake that should be fixed with the next release. 恩,可能跟编译器也有关系,可能我的2010版本比较低了~~都没有生成plplotf95cLY_Debugd这个工程~~我下来再看看,还是先用dislin 感谢aliouying------------给plplot的维护者发邮件咨询咨询,建议vs下plplot使用等待下一个版本
页:
[1]
2