VS2017 vs Xcode object compilation errors

I have a project that I need to run cross platform. It uses a far few addons:

ofxAppUtils
ofxCache
ofxCv
ofxDelaunay
ofxFaceTracker
ofxGeo
ofxGui
ofxHistoryPlot
ofxHTTP
ofxIO
ofxJSONRPC
ofxMaps
ofxMediaType
ofxMSAInteractiveObject
ofxNetworkUtils
ofxOpenCv
ofxOsc
ofxPoco
ofxSpatialHash
ofxSQLiteCpp
ofxSSLManager
ofxTaskQueue
ofxTiming

I am using ofxApputils to run scenes and structure (I used it a few times before I liked the ease of making changes). I have the app compiling fine on OSX (Xcode 8) and each of the addons (and their examples) compile fine on windows (well almost). When I try to compile with VS2017 I get some linker errors, but only from ofxHttp and ofxFacetracker. After some testing it seems ofxFacetracker is not compiling on VS2017 (I tried a fresh nightly and redownloaded the addons). The error can be seen here:

The ofxHttp error is different, it compiles fine alone, but it is used by other addons (Basically I am using ofxMaps and ofxJSONRPC and they have some lengthy dependencies). Seemingly every function from ofxHttp gives a linker error like this:

Error unresolved external symbol "public: virtual __cdecl ofx::HTTP::Response::~Response(void)" (??1Response@HTTP@ofx@@UEAA@XZ)

So my guess is that VS2017 is for some reason overwriting the obj files during compilation. I do have some errors that may relate to this. Namely that I see this in the build output:

1>obj\x64\Release\Response.obj : warning LNK4042: object specified more than once; extras ignored

This I a guessing is because of multiple includes and the way VS is dealing with them. Could this be the source of my problems? Or has there been a change in the way VS2017 or the PG is dealing with adding libraries?

Does anyone have some experience with ofxAppUtils? Is there something bad about including stuff in multiple files?

Did anyone see this before?

In general, help…

Currently VS2017 and oF has problem if you have multiple files with same name. You can fix it by changeing obj file name by manual like this.

That fix should be already in the nightly builds btw

I just pulled again from the master, and it still does not work. Any idea what the commit was that fixed it?

I managed to find a work around - from this stackoverflow post

This is what worked for me:

change the value under C/C++ -> Output Files -> "Object File Name" to be the following:

$(IntDir)/%(RelativeDir)/

Have you regenerated project files after pull? Since it includes changes against vs template, you’ll need to update all project files made by old version.

And $intDir/%RelativeDir is the old setting overwritten by my PR because it introduces another difficult issue explained in the link above. If you switch debug/release/32bit/64bit, it makes link error.

At the time of the original post I had regenerated the project files. I can try again tomorrow (pull from git and generate again)

And please also don’t forget to add unique Object File Name to the one of your conflicting file.