Avatar of bigcheeze111
 asked on

XCode/Boost Library Question - "Error: Template with C linkage"

Hello All,

I've recently just started using the XCode environment on the MAC OSX platform and have been trying to configure the C++ Boost Library (Looks to be a great library). I've successfully built the library using Boost.Jam and have placed this build under the default locations for XCode (on my system, at least) --> "/Developer/SDKs/MacOSX10.4u.sdk/usr/boost" include and "/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/boost".

Upon attempting to utilize one of the headers, "path.hpp" in this instance, I am encountered with  numerous compiliation errors pointing to various other header files. The error of mention is "error: template with C linkage".

To my knowledge, the Boost library has been built correctly and the header reference is obviously correct.

#include <boost/filesystem/path.hpp>

I've read some other sources which mention that I should add the boost directory to the Header Search Paths in my build settings(Most notably, http://www.cocoadev.com/index.pl?BoostLibraries). I have attempted this only to yield a greater and more diverse error set. In particular I have performed this by going to "Project-->Edit Project Settings-->Build-->Header Search Paths" and entering "/Developer/SDKs/MacOSX10.4u.sdk/usr/boost" as a search path and checking off the "recursive" check box. I've also done the same for the "User Header Search Path".

Am I doing something wrong? Has anyone had similar issues? Can you point me in the right direction? Please let me know if any further clarification is necessary. I'd be happy to provide it.

You're assistance is greatly appreciated. Thank you.


Avatar of undefined
Last Comment

8/22/2022 - Mon

>>Am I doing something wrong?

Are you using a source file with a .c extension (as opposed to .cpp/.cxx/.C)?

No. I am using a source file with a .cpp extension.

Does any one have any additional thoughts?

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.