Adding extra libraries in the Projucer: errors

projucer

#1

Hi, I’m having trouble trying to add extra libraries to a Projucer project. Currently trying to integrate this:

I’ve gotten to the point where the library is added to the project and I’m getting everything pointed correctly to where I can make a Robot Keyboard object. Then when the project compiles in the projucer, I get an error on any file that has “Robot.h” included:

“Source/MainComponent.cpp: no template named ‘equal_to’; did you mean ‘__equal_to’?”

Clicking on this then goes to some file called “unordered_map” that I don’t recognize.

I haven’t really touched C++ in years, so I’m hazy on how I’m including libraries. Can anyone post a clear step by step on how to include other libraries in an existing Projucer project? I’ve looked around and I haven’t seen anything super clear about this.

Thanks for any and all leads on this.


#2

Linking to extra libraries is fairly straightforward - in your exporter you need to add the library name in the “External libraries to link” section:

And then in your build configurations you can put the path to where the library is on your machine in the “Extra library search paths” section:

The error that you are getting looks like a compiler issue. Do you meet the minimums for your platform in the “Prerequisites” section here?


#3

Thanks so much for the help! I appreciate going the extra mile with the screen shots.

Yes, I do meet the minimums for my platform. And in the compiling of the library I’ve also been able to compile a test app, which I can confirm works on my machine.

I’ve been poking around, asking some C++ savvy friends, but I’m still getting the same errors. You’ll need to forgive my ignorance, but I’m sure its just because I’m not versed in how to properly enter the information into these fields.

Library name: I’ve compiled and have a libRobot.a file. In this field do I enter: libRobot, libRobot.a, ‘libRobot.a’, or “libRobot.a”?

Same types of questions with my library search paths. Absolute vs. relative paths, leading …/ or not, single/double/no quotes? Also, am I including my Source folder (with headers and .cc files), or do I not need to do that?

I’ve tried many permutations of all of the above and I’m still getting the same error.


#4

Try the only remaining permutation, Robot (no lib prefix)!

There’s no need to add your source folder to the header paths if all of your source files include the headers correctly. If you look at the build log of whatever IDE you’re using to compile your project you’ll be able to see what paths are actually being searched.