[AD] msvc7 vs new_api_branch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
my adventures with MSVC7 and new_api_branch...
most of the following is because MSVC7 is apparently not C99.
-----------
1. MSVC7 doesn't seem to have a stdbool.h file.
after advice on #allegro, the suggested solution was this
/new_branch_api/include/allegro/base.h
41: #ifdef __cplusplus
42: #define AL_BEGIN_EXTERN_C extern "C" {
43: #define AL_END_EXTERN_C }
44: #else /* C */
#ifndef _MSC_VER
#include <stdbool.h>
#else
typedef char bool;
#define false 0
#define true (!false)
#endif
// #include <stdbool.h>
/* Account for broken stdbool.h headers. We need sizeof(bool) on C
* to be the same as sizeof(bool) on C++, i.e. one byte.
*/
// #undef bool
// #define bool unsigned char
which worked. i'd like to see it added, however I am sure its still not
going to make anyone happy polluting the base.h with msvc specific #ifdef's
-----------------
2. the /src/compat files where not part of the dependancies
so i added the /src/compat/*.c to the first line of dependancy
generation code in makefile.vc about line 445.
------------------
3. another stdbool.h missing header, after advice on #allegro was
suggested i remove that line completely. which fixed the problem.
obj/msvc/runner.exe C:/PROGRA~1/MICROS~1.NET/VC7/bin/cl @ -nologo
-DALLEGRO_STATICLINK -DALLEGRO_SRC -DDEBUGMODE=1 -W1 -Gd -
Zi -MDd -I. -I./include -Foobj/msvc/alld_s/vector.obj -c src/misc/vector.c
vector.c
src\misc\vector.c(28) : fatal error C1083: Cannot open include file:
'stdbool.h': No such file or directory
make: *** [obj/msvc/alld_s/vector.obj] Error 2
----------------------
4. src\compat\cokeybd.c(518) : error C2065: '__func__' : undeclared
identifier
MSVC7 has a __FUNCTION__ macro, so somewhere we could
#define __func__ __FUNCTION__
but where?
/include/allegro/platform/aintwin.h
worked for me, perhaps the other msvc7/c99 lacking definitons i
described above could also go in that header too.
----------------------