Sign in to follow this  

include issues (fluidstudios logger)

This topic is 4814 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

I'd really like to use the Fluid Studios logger class (http://www.fluidstudios.com/). I'm having trouble figuring out how to actually include it in my project. If I include the 'logger.h' file, I get a whole bunch of compile errors such as
logger.h(99) : error C2143: syntax error : missing ',' before '&'
If I include the 'logger.cpp' file everything is kosher until I want to include the file in another source file, in which case the linker spits
error LNK2005: "class Logger logger" (?logger@@3VLogger@@A) already defined in kernel.obj
There's no support for this class, but I like the advertized functionality and I really don't want to write my own. Anyone have any experience with this or perhaps knows whats wrong from the symptoms? I'm hoping I'm just being an idiot and not seeing the obvious here. Thanks, Dustin [Edited by - thedustbustr on October 10, 2004 9:53:50 PM]

Share this post


Link to post
Share on other sites
The already defined error can be solved by adding inclusion guards in both the header and the cpp file.

Inclusion guards look like:

#ifndef _UNIQUE_NAME_H_
#define _UNIQUE_NAME_H_

// All the code here

#endif


For the CPP file, replace the _H_ with a _CPP_ or something.

As for the other problems, I advice to either add the logger files to your project file, or copy them into your compiler's include directory.

Toolmaker

Share this post


Link to post
Share on other sites

This topic is 4814 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