If you move the ace/Log_Msg.h header file to be compiled first, you
get a single error:
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\allegro\system.h(31): fatal error C1001: INTERNAL
COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more
information
If you try to put the allegro.h header first, then the ace/Log_msg.h
and then the winalleg.h (or alternatively don't even include the
winalleg.h header) you get the following errors with this program:
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(541): error C2371: 'BITMAP' :
redefinition; different basic types
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\WinGDI.h(3587): error C2229: struct
'tagDIBSECTION' has an illegal zero-sized array
c:\ACE\ACE_wrappers\ace\OS_main.h(176): warning C4005: 'main' : macro
redefinition
c:\Documents and Settings\Kirk\My Documents\Visual Studio
Projects\AllegroAceTest\main.cpp(14): error C2065: '_mangled_main' :
undeclared identifier
I've created a simple program to illustrate the problem.
#include <allegro.h>
#include <winalleg.h>
#include "ace/Log_Msg.h"
int main(int argc, char* argv[])
{
allegro_message("Allegro Message: Testing ACE and Allegro library
integration" );
ACE_DEBUG((LM_DEBUG, "ACE_DEBUG: Testing ACE and Allegro Library
integration\n" ));
}
END_OF_MAIN();
In order to attempt to build this simple application and see the
errors reported, you first need to build the ACE networking library on
a Windows machine. I currently am building this application and
getting the errors with MSVC7 compiler.
1. Download ACE. http://deuce.doc.wustl.edu/ACE.zip.
2. Follow the build instructions for building ACE on Windows with
MSVC++
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/ACE-INSTALL.html#msvc
3. Create a simple MSVC7 project with one file and copy/paste the code
in this post.
4. Set the project properties to be able to find the ACE include file
and use the ACE dll for linking.
Thanks in advance!
Kirk Black
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click