Hi all,
I am trying to compile 4.0.5 with microsoft visual studio community 2015. I am getting loads of errors.
There is the old instruction to compile, it is not quite accurate. My exact project settings are in the attachment.
1)
I've added all the .h and .c files, the files in the win folder. When I compile i receive eror: macro definition of snprintf conflicts with Standard Library function declaration
This code seems outdated, so I've commented it out snprintf:
/**
* Native MSVC compiler doesn't understand inline or snprintf
*/
#ifdef _MSC_VER
# define inline __inline
//# define snprintf _snprintf
#endif
2)
Next, I get that pwd.h is not added. But I find the #include <pwd.h>under UNIX, while I am trying to compile as WINDOWS
So I've added || defined(_MSC_VER) to gain:
/**
* Extract the "WINDOWS" flag from the compiler
*/
# if defined(_Windows) || defined(__WINDOWS__) || \
defined(__WIN32__) || defined(WIN32) || \
defined(__WINNT__) || defined(__NT__) || defined(_MSC_VER)
# ifndef WINDOWS
# define WINDOWS
# endif
# endif
3)
now I am left with 100s of errors. I like this one:
static const int list_size = 64;
const char *initial_pronoun;
const char *name_list[list_size];
"Expression (list_size) must have constant value," which has been defined just two lines above!
There is probably something obvious that I missed. Does someone have a clue?
Thanks, Willem.
I am trying to compile 4.0.5 with microsoft visual studio community 2015. I am getting loads of errors.
There is the old instruction to compile, it is not quite accurate. My exact project settings are in the attachment.
1)
I've added all the .h and .c files, the files in the win folder. When I compile i receive eror: macro definition of snprintf conflicts with Standard Library function declaration
This code seems outdated, so I've commented it out snprintf:
/**
* Native MSVC compiler doesn't understand inline or snprintf
*/
#ifdef _MSC_VER
# define inline __inline
//# define snprintf _snprintf
#endif
2)
Next, I get that pwd.h is not added. But I find the #include <pwd.h>under UNIX, while I am trying to compile as WINDOWS
So I've added || defined(_MSC_VER) to gain:
/**
* Extract the "WINDOWS" flag from the compiler
*/
# if defined(_Windows) || defined(__WINDOWS__) || \
defined(__WIN32__) || defined(WIN32) || \
defined(__WINNT__) || defined(__NT__) || defined(_MSC_VER)
# ifndef WINDOWS
# define WINDOWS
# endif
# endif
3)
now I am left with 100s of errors. I like this one:
static const int list_size = 64;
const char *initial_pronoun;
const char *name_list[list_size];
"Expression (list_size) must have constant value," which has been defined just two lines above!
There is probably something obvious that I missed. Does someone have a clue?
Thanks, Willem.
Comment