Jump to content


C++ VS2017 r17.2, issues with compiling

C++ VS2017 r17.2 OpenSSL

  • Please log in to reply
5 replies to this topic

#1 TheMPC

TheMPC

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 05 January 2018 - 04:36 PM

Hey people,

I'm hoping anyone here can answer some questions I have with integrating the Perforce API into my application.

I've downloaded the required .lib files from the FTP server for r17.2 and I've been integrating these as instructed on the manual. The manual does clarify the issues with OpenSSL etc so I've retrieved the ssleay32.lib and libeay32.lib from source forge.

Now, the issue is that all library files are included in the project in the required order, but I'm receiving a lot of unresolved external issues:

1>librpc.lib(netsslcredentials.obj) : error LNK2001: unresolved external symbol BIO_new
1>librpc.lib(netsslcredentials.obj) : error LNK2001: unresolved external symbol BIO_ctrl
1>librpc.lib(netsslcredentials.obj) : error LNK2001: unresolved external symbol BIO_free_all
...
...
...
1>libsupp.lib(sha256.obj) : error LNK2001: unresolved external symbol SHA256_Init
1>libsupp.lib(sha256.obj) : error LNK2001: unresolved external symbol SHA256_Update
1>libsupp.lib(sha256.obj) : error LNK2001: unresolved external symbol SHA256_Final
Removed a lot in between, but 107 in total.

With additional library dependances setup as such:

p4/libclient.lib
p4/librpc.lib
p4/libsupp.lib
p4/ssleay32.lib
p4/libeay32.lib

I hope someone here has any ideas on how to resolve this.

Cheers,
TheMPC

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 640 posts

Posted 08 January 2018 - 07:11 PM

I haven't seen these particular errors before and it wouldn't shock me if there's a bug with the API build and/or manual, since they reference SHA256 and that's a relatively new feature -- maybe there's some other library now that libsupp depends on and nobody added it to the API distribution.  Are you able to build the full p4 client from source?

#3 TheMPC

TheMPC

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 10 January 2018 - 02:49 PM

Hey Sambwise, thanks for your reply,

I haven't tried to build the fill p4 client from source, I would also not know where to get the source from to be honest so if you have directions towards that that'd be great and I'll try that. From what I know the API source and client source aren't open to public so I wouldn't know where to get the client you're referring to.

Tonight I'm going to try and put the libraries in an empty project to see if it's just my setup (which very well might be).

#4 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 640 posts

Posted 10 January 2018 - 04:20 PM

The p4 client code is in the Workshop:

https://swarm.worksh...rce_software-p4

For now, at least.  I recommend archiving a copy just in case; it's a very useful reference when developing against the API.  :)

#5 TheMPC

TheMPC

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 11 January 2018 - 10:34 AM

Thanks! will try that, first time developing with the API so thanks for the info, p4 itself is wonderful so I was happy to see I could integrate it into my application. I will be back with updates later tonight.

#6 TheMPC

TheMPC

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 12 January 2018 - 07:01 PM

Thanks for your help Sambwise, downloading and compiling the source did work out fine.

Eventually I managed to find that I had to include Ws2_32.lib to my application, which I always thought was present, but alas I must have been mistaken.





Also tagged with one or more of these keywords: C++, VS2017, r17.2, OpenSSL

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users