#8323 closed patch (fixed)
main.cpp - Fix to compile when no USE_* flag is specified
Reported by: | SF/theraraavis | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | Port: Win32 |
Version: | Keywords: | ||
Cc: | Game: |
Description
VC6 compiler would give a syntax error ";" for line 89:
const char *gScummVMFeatures =
as it has preprocessor definitions directly following it (The compiler isn't smart and gets confused.)
Adding empty double quotes would fix this.
const char *gScummVMFeatures = ""
Diff file attached.
Ticket imported from: #893813. Ticket imported from: patches/428.
Attachments (1)
Change History (5)
by , 21 years ago
Attachment: | main.cpp.diff added |
---|
comment:1 by , 21 years ago
The compiler never gets to see preprocessor statements, they are removed by the preprocessor before the data is fed into the compiler.
However, there *is* an issue here, namely if non of the USE_* flags is specified, then we end up with illegal code (which is probably what you are seeing).
comment:2 by , 21 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Summary: | main.cpp - Fix to compile with no errors in VC6 → main.cpp - Fix to compile when no USE_* flag is specified |
comment:3 by , 21 years ago
I definitely gave a bad description. I had none of the USE_* flags specified, so the compiler tried to compile the line
const char *gScummVMFeatures = ;
and that, as you said, is indeed illegal code. Ah, well. Do with it what you will. :-)
comment:4 by , 6 years ago
Component: | → Port: Win32 |
---|
Diff file for quick change to main.cpp