# include issues (fluidstudios logger)

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

## 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 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

1. 1
2. 2
Rutin
25
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 22
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631764
• Total Posts
3002210
×