ofxFaceTracker error LNK2019 in Visual Studio

I’m working in a W7 and I added the ofxCv and ofxFaceTracker folders to the addon folder. I usually compile with Visual Studio but the AdvanceExample of ofxFaceTracker didn´t work fine. This is the error that appears:

Error 2 error LNK2019: símbolo externo “public: __thiscall ofxFaceTracker::ofxFaceTracker(void)” (??0ofxFaceTracker@@QAE@XZ) sin resolver al que se hace referencia en la función “public: __thiscall testApp::testApp(void)” (??0testApp@@QAE@XZ) D:\OpenFrameworks\2_Visual\of_preRelease_v007_vs2010\of_preRelease_v007_vs2010\addons\ofxFaceTracker\miapp\main.obj

anyone knows how to fixed?? thx.

I had to deal with this same problem recently, so even though your error isn’t in English, I can still understand it.
Here’s a long explanation of what it means:
To put it simply though, you’re most likely not linking all the libraries you need. You can do this by right-clicking on the project and going to Properties>Configuration Properties. Then make sure you have all your paths for C/C++>General>Additional Include Libraries set correctly. Then go to Linker>General>Additional Library Directories and make sure all those paths are set correctly. Then go to Linker>Input>Additional Dependencies and make sure these paths are correctly pointing to any lib files you need. Also, with ofxFaceTracker, you need to make sure you have Jason Saragih’s library, ofxCv, and ofxOpenCv that comes with openframeworks when you downloaded it.

I’m dealing with the same problem right now (Windows 7 - VS2012) I tried the solution elveatles suggested, but it seems for me, that every path to the libraries in the properties of Linker and C/C++ is correct. But I don’t know if I’m right…

Does anyone have a clue what else could be done here?


PS: When trying to run with CodeBlocks I get the following error:
…\openFrameworks\utils\ofThread.h|298|error: ‘LONG_MAX’ was not declared in this scope
I don’t know if this is of any help…

I just found the solution:

Thanks to Kyle for the answer in this GitHub thread:

1 Like

Yeah most likely they had 2 testApp.cpp/testApp.h included in the project.

I have noticed that some examples built by the project generator, where they already have been generated to disk, add this second or many testApp.cpp/testApp.h to the project. This will now be of course ofApp.cpp/ofApp.h for future projects 0.8+ built with the project generator if this has not been fixed.

Also applies to Xcode.