开发者

Trouble building P4Python with P4API

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" (?nullSt开发者_开发技巧rBuf@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.


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 support@perforce.com for any questions relating to Perforce and the P4API.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜