Opened 11 years ago
Closed 10 years ago
#595 closed defect (fixed)
MinGW (codeblocks) compilation problem
| Reported by: | Alpar Juttner | Owned by: | Alpar Juttner |
|---|---|---|---|
| Priority: | critical | Milestone: | LEMON 1.4 release |
| Component: | core | Version: | hg main |
| Keywords: | Cc: | ||
| Revision id: |
Description
We use WIN32 define at several places in order to check the underlying macro. This however does not work with (at least recent versions of) MinGW and CodeBlocks, because it does node define WIN32.
This link indicates that this is actually the expected behaviour. The compiler normally defines _WIN32.
What shall we do? I can imagine the following resolutions.
- Replace
WIN32to_WIN32everywhere in the code - Put something like
#ifdef _WIN32 #ifndef WIN32 #define WIN32 #endif #endif
into core.h
- Have the platform checked by
CMAKEand put theWIN32define conditionally tolemon/config.h(generated from lemon/config.h.in)
We may define LEMON_WIN32 instead of WIN32.
Which option do you prefer?
Note: See
TracTickets for help on using
tickets.


Two changesets has been merged to branches 1.3 and default:
lemon/config.h.indefinesLEMON_WIN32and this define is used to check the platform throughout the library.Maintainermode.