If needed I can post the base classes as well. I hope I posted
everything that is necessary. To be honest, I wondered why the
FileLoggerEngine::factory variable needs to be defined outside the
class definition while I was reading the article, and now this gives
the problem.

Advertisements

* Jaco Naude:
> Hi
>
> I'm trying to implement a template based factory, following the
> guidelines of the following article:
> http://www.codeproject.com/KB/architecture/all_kinds_of_factories.aspx
> (I'm trying Factory 6: the template-factory).
>
> I get it to work fine, but as soon as I define more than 1 static
> factory, each one in a different class, I get the following error:
>
> Creating library file: bin\libQtilities.a
> ./tmp\Logger.o: In function
> `ZN9Qtilities24AbstractFormattingEngineD1Ev':
> D:/ScinericSoftware/Products/Qtilities/trunk/include/Qtilities/
> AbstractFormattingEngine.h.bss+0x8): multiple definition of
> `Qtilities::FileLoggerEngine::factory'

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!