使用 P4API 构建 P4Python 时遇到问题
我正在尝试构建 P4Python,如此处 以及此处找到的更新版本。我的 P4 API 位于 C:\p4api。我已在 setup.cfg 中正确设置了 p4_api 变量。在提取 P4Python 的 C:\P4Python-2010.1 中,我运行命令 C:\P4Python-2010.1>python setup.py install >; log.txt
来安装它。
然而,我得到了大量未解决的外部信息,如 log.txt 中所示(这些只是其中的一部分):
P4Result.obj : error LNK2019: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA) referenced in function __ehhandler$?Fmt@P4Result@@AAEXPBDPAU_object@@AAVStrBuf@@@Z
PythonMergeData.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA)
P4MapMaker.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA)
P4API.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA)
我不知道它在哪里寻找这些东西或它们应该在哪里。我将 P4API 目录添加到 PATH,但仍然出现错误。非常感谢任何帮助。
I'm trying to build P4Python, as described here and a more recent version found here. I have the P4 API located at C:\p4api. I have set the p4_api variable correctly in setup.cfg. While in C:\P4Python-2010.1, which is where P4Python is extracted, I run the command C:\P4Python-2010.1>python setup.py install > log.txt
to install it.
However, I get a ton of unresolved externals as shown in log.txt (these are only a few):
P4Result.obj : error LNK2019: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA) referenced in function __ehhandler$?Fmt@P4Result@@AAEXPBDPAU_object@@AAVStrBuf@@@Z
PythonMergeData.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA)
P4MapMaker.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA)
P4API.obj : error LNK2001: unresolved external symbol "private: static char * StrBuf::nullStrBuf" (?nullStrBuf@StrBuf@@0PADA)
I have no idea where it's looking to find these things or where they should be. I added the P4API directory to PATH, and I still get the errors. Any help is greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
除了Python版本之外,您还可以提供您正在使用的P4API(确切的版本字符串)吗?
顺便说一句,您可以通过访问 Perforce 公众在这里查找预构建的二进制版本来让您的生活更轻松:
http://public.perforce.com:8080/guest/sven_erik_knop/P4Pythonlib/bin/?ac=83
亲切的问候
Sven Erik
PS:
您也可以联系 [电子邮件受保护] 有关 Perforce 和 P4API 的任何问题。
In addition to the Python release could you also provide the P4API (exact Version string) you are using?
By thy way, you can make your life easier by going to the Perforce public to find pre-built binary releases here:
http://public.perforce.com:8080/guest/sven_erik_knop/P4Pythonlib/bin/?ac=83
Kind regards
Sven Erik
PS:
You can also contact [email protected] for any questions relating to Perforce and the P4API.
是的: https://swarm.workshop.perforce.com/projects/p4pythonlib /files/p4pythonlib/bin
顺便说一句,p4python 现在位于 PyPi 档案中,因此您可以简单地使用(对于 Python 2.7、3.3 和3.4,32 位和 64 位)
pip install p4python
Yep: https://swarm.workshop.perforce.com/projects/p4pythonlib/files/p4pythonlib/bin
By the way, p4python is now in the PyPi archives, so you could simply use (for Python 2.7, 3.3 and 3.4, both 32 and 64 bit)
pip install p4python
这是 github 上的新仓库位置,
https://github.com/perforce/p4python
根据
https://github.com/perforce/p4python/blob/master/RELNOTES。文本
自2015年起,可以通过pip安装
通过pip安装
从2015.1开始,P4Python可以通过pip安装。只需运行命令
pip install p4python
this is new repo location on github,
https://github.com/perforce/p4python
according to
https://github.com/perforce/p4python/blob/master/RELNOTES.txt
since 2015 it can be installed via pip
Installation via pip
P4Python can be installed via pip from 2015.1 onwards. Simply run the command
pip install p4python