Search code examples
perforcep4python

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" (?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.


Solution

  • 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.