Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Fix.h

This thread is locked; no one can reply to it. rss feed Print
Fix.h
Peter Joachim
Member #3,069
December 2002

I've used Allegro before with the DJGPP compiler without problems. Now, I'm trying to use the library with VC++ 4.0, and I can't get any of the demo programs to compile. I've set Multithread DLL, and am linking to the alleg.lib, but I get the following errors from Fix.h. I won't include them all, as most are similar type things. I'm pretty much a C programmer learning C++, so I have no idea what's wrong. The installation appeared to be successful, but maybe it wasn't? Thanks in advance for the help.

C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2501: 'explicit' : missing decl-specifiers
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2146: syntax error : missing ';' before identifier 'fix'
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2327: 'fix::v' : member from enclosing class is not a type name, static, or enumerator
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2065: 'v' : undeclared identifier
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2065: 'x' : undeclared identifier
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2064: term does not evaluate to a function
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2056: illegal expression
C:\MSDEVSTD\INCLUDE\allegro/fix.h(34) : error C2656: '__ctor' : function not allowed as a bit field
C:\MSDEVSTD\INCLUDE\allegro/fix.h(35) : error C2501: 'explicit' : missing decl-specifiers
C:\MSDEVSTD\INCLUDE\allegro/fix.h(35) : error C2146: syntax error : missing ';' before identifier 'fix'
C:\MSDEVSTD\INCLUDE\allegro/fix.h(35) : error C2327: 'fix::v' : member from enclosing class is not a type name, static, or enumerator
C:\MSDEVSTD\INCLUDE\allegro/fix.h(35) : error C2064: term does not evaluate to a function
C:\MSDEVSTD\INCLUDE\allegro/fix.h(35) : error C2056: illegal expression
C:\MSDEVSTD\INCLUDE\allegro/fix.h(35) : error C2656: '__ctor' : function not allowed as a bit field
C:\MSDEVSTD\INCLUDE\allegro/fix.h(36) : error C2501: 'explicit' : missing decl-specifiers
C:\MSDEVSTD\INCLUDE\allegro/fix.h(36) : error C2146: syntax error : missing ';' before identifier 'fix'
C:\MSDEVSTD\INCLUDE\allegro/fix.h(36) : error C2327: 'fix::v' : member from enclosing class is not a type name, static, or enumerator
C:\MSDEVSTD\INCLUDE\allegro/fix.h(36) : error C2064: term does not evaluate to a function
C:\MSDEVSTD\INCLUDE\allegro/fix.h(36) : error C2056: illegal expression
C:\MSDEVSTD\INCLUDE\allegro/fix.h(36) : error C2656: '__ctor' : function not allowed as a bit field
C:\MSDEVSTD\INCLUDE\allegro/fix.h(37) : error C2501: 'explicit' : missing decl-specifiers
C:\MSDEVSTD\INCLUDE\allegro/fix.h(37) : error C2146: syntax error : missing ';' before identifier 'fix'

Rash
Member #2,374
May 2002
avatar

What happens if you add the following line before you (indirectly) include fix.h?

#define explicit

If this works, it looks like Allegro needs an EXPLICIT or AL_EXPLICIT preprocessor define as well.

Bob
Free Market Evangelist
September 2000
avatar

I don't think VC4 is even supported by Allegro. Although the docs do refer to Allegro being buildable in MSVC 4, I don't think you'll be able to do any serious work with it.

Just about any compiler nowadays is better than MSVC4.

--
- Bob
[ -- All my signature links are 404 -- ]

Peter Joachim
Member #3,069
December 2002

That solved my compile problem, although I'm not sure why adding an empty macro declaration at that point would help. Now, it's asking for MSVCRTD.dll when I try to run it. This file isn't on my system. Perhaps VC++ 4.0 really isn't compatible? Once I downloaded the proper DLL files, the program crashed.

Go to: