I’ve been trying to set up a couple addons that use the Poco precompiled libraries from the latest github build. ofxAxisGrabber and ofxIpVideoGrabber. Both give the same issue on unresolved external symbols:
1>IPVideoGrabber.obj : error LNK2019: unresolved external symbol "public: void __thiscall Poco::Net::HTTPBasicCredentials::authenticate(class Poco::Net::HTTPRequest &)" (?authenticate@HTTPBasicCredentials@Net@Poco@@QAEXAAVHTTPRequest@23@@Z) referenced in function "protected: virtual void __thiscall ofx::Video::IPVideoGrabber::threadedFunction(void)" (?threadedFunction@IPVideoGrabber@Video@ofx@@MAEXXZ)
It’s been issued under ofxAxisGrabber but I thought this could be a problem with the OF libs. I wanted to get feedback here before issuing to the big repo. Thanks!
i’ve seen the issue but i don’t use windows usually so haven’t had the chance to test what’s going on, it seems like some symbol that exists in other platforms doesn’t exist in windows for some reason, it might be that the library is missing that symbol in windows but not idea why it might be
I think there’s a version mismatch between the headers files in the include folder and the compiled version of the poco library. If you look into the symbols into the .lib file, you can find the authenticate function, but it has a slightly different prototype (it says ?authenticate@HTTPBasicCredentials@Net@Poco@@QBEXAAVHTTPRequest@23@@Z instead ?authenticate@HTTPBasicCredentials@Net@Poco@@QAEXAAVHTTPRequest@23@@Z (notice the B instead of A))
Looking at POCO git history, HTTPRequest was updated 7 month ago, the same time the vs build of Poco was made, while on oF repo files is 3 years old…
Try to replace your file by this one (or in a more involved way, replace all the headers of your poco, but it will lead to trouble regarding Arturo’s patches):
i did some changes but it only affect some header files and it’s not used by poco itself so it’s safe to compile the source from the original code. indeed the libraries in other platforms were compiled before those changes
Oh I see what you mean.
When I wanted to compile oF with VS2013 I just got the latest release of Poco and replaced the previous headers with the new ones. It caused mayhem in my ofEvent so I had to put your modification back, hoping for the best. Not the safest way of proceeding, hence my warning to chucklepant
yes you’ll need those headersfor OF but it’s enough to compile the libraries and overwrite the binaries in lib/vs while leaving the headers that are already in OF.
if someone compiles the right version it would be super useful if you can send a PR or just post them somewhere so we can change them
The build succeded, although some of the poco examples didn’t build. In OF I’m getting value '1600' doesn't match value '1700' with the new libraries. They are up in my OF fork in case someone wants to grab them and try
PocoFoundationmdd.lib(Bugcheck.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in ofxBaseGui.obj
2>PocoFoundationmdd.lib(Exception.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in ofxBaseGui.obj
2>PocoFoundationmdd.lib(Mutex.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in ofxBaseGui.obj
2>PocoFoundationmdd.lib(AtomicCounter.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in ofxBaseGui.obj
> ...
Where can I set this?
Edit:
Fixed, I had to build for 2012 instead of 2010, 1.4.3p didn’t support 2012 out of the box, I guess when porting OF to 2012 the 1.4.6 was used because of the 2012 support, although headers weren’t exactly the same. I’ll try the 2012 builds and update here