difference between #if defined(WIN32) and #ifdef(WIN32)

If you use #ifdef syntax, remove the parenthesis.

The difference between the two is that #ifdef can only use a single condition,
while #if defined(NAME) can do compound conditionals.

For example in your case:

#if defined(WIN32) && !defined(UNIX)
/* Do windows stuff */
#elif defined(UNIX) && !defined(WIN32)
/* Do linux stuff */
#else
/* Error, both can't be defined or undefined same time */
#endif

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)