It sounds like the value of _UNICODE is different at different places in your code. Juce will work with unicode either turned on or off, but it must be consistent across your whole project.
Maybe try setting _UNICODE=1 in your project settings, or look in these 3rd party headers to see if they mess around with it.
The important thing to notice is that the Main.cpp is using the "_UNICODE" WinMain definition.
This is no problem until something causes for example winbase.h to be included. (Like Ogre or Boost)
When <Ogre.h> is included at any random location in your project it causes winbase.h to be included, but the Main.ccp will still use the "_UNICODE" version of WinMain => collision => "second C linkage of overloaded function not allowed"
At least that is my guess what is happening...
This can be 'dirty hack fixed' by including <Ogre.h> (or Boost or whatever...) as the first header file in your Main.cpp (even before the juce header) => winbase.h is included first => Main.cpp is using the "WINAPI || _WINDOWS_" definition of WinMain => no collision anymore
But this of course should not be the recommended solution... :)
Hmm, doing some research, it seems that the unicode line could actually be removed without any ill effects, so leaving:
#if JUCE_WINDOWS && ! defined (_CONSOLE)
#if defined (WINAPI) || defined (_WINDOWS_)
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (HINSTANCE, HINSTANCE, const LPSTR, int)
#else
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (void*, void*, const char*, int)
#endif
AFAICT the unicode version should actually be called wWinMain, but it's not actually needed since code elsewhere gets the command line params, so I *think* it should just work ok without it..
If the "_UNICODE" part is removed the Main.cpp will use the ELSE part which is:
int __stdcall WinMain (void*, void*, const char*, int)
What we actually need the Main.cpp to use is the first definition:
int __stdcall WinMain (HINSTANCE, HINSTANCE, const LPSTR, int)
I think this "autodetection" mechanism simply has no chance to behave correctly, because it can't divince that winbase.h is included somewhere in the application after Main.cpp has already decided to use the wrong definition.
I am not sure whether this is the best solution, but i would suggest introducing another custom flag like "FORCE_WINAPI_MAIN" or whatever you like to call it:
#if defined (WINAPI) || defined (_WINDOWS_) || defined (FORCE_WINAPI_MAIN)
#define JUCE_MAIN_FUNCTION int __stdcall WinMain (HINSTANCE, HINSTANCE, const LPSTR, int)
Then people who would like to use Ogre or Boost or whatever could simply add this flag to the "Preprocessor definitions" of their project in the Introjucer to tell JUCE that it should ignore "autodetection" and simply use the first definition.
FYI I tried this on windows and did finally manage to come up with some code that seems to work in all situations. Was surprisingly hard to find some syntax that worked either with or without windows.h being included.