Sign in to follow this  

conflicting headers

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys i'm integrating various libraries into my application. (Devil, Fox-tool kit, ODE, and a few others. but with two of the libraries include different versions of cmath and this causes a problem with compiling. whats the best way to deal with conflicting headers when integrating big components like these together. thanks

Share this post


Link to post
Share on other sites
Generally, you get around conflicting headers by including the path (or enough of the path to make them unique). Then you have to also change the include search paths. For example, if you want to include one or all of the following files:

C:\a\b\header.h
C:\a\c\header.h
C:\d\e\f\header.h

then you would include them like this:

#include "b/header.h"
#include "c/header.h"
#include "f/header.h"

and set the paths to be

C:\a
C:\d\e

However, in your case there is a bigger problem. cmath is a standard header file and there should only be one version -- the version that comes with your compiler.

Share this post


Link to post
Share on other sites
While you should probably use the header file that comes with your compiler, if your compiler is old(er), then you might want to use the latest version of the header file, so long as it is compatible(sp?) with your compiler, of course.

Share this post


Link to post
Share on other sites

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this