VC++2008, libgfl290 & WIN32 macro

Discussions on GFL SDK, the graphic library for reading and writing graphic files

Moderators: XnTriq, helmut, xnview

Zai++
Posts: 21
Joined: Fri Nov 18, 2005 4:57 pm
Location: Moscow

VC++2008, libgfl290 & WIN32 macro

Post by Zai++ »

VC++2008, libgfl290 :

D:\Program Files\Microsoft Visual Studio 9.0\VC\include\Layer3\libgfl.h(62) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

Code: Select all

#if defined(WIN32)
    #include <basetsd>

    typedef INT8     GFL_INT8;
    typedef UINT8    GFL_UINT8;
    ...
    #else
    #include <stdint>           //line 62
    typedef int8_t     GFL_INT8;
    typedef uint8_t    GFL_UINT8;
    ...
#endif 
isn't WIN32 macro defined in VC???

I added WIN32 to preprocessor definitions and it became ok.
Ralf
Posts: 7
Joined: Fri Apr 11, 2008 9:15 am

Re: VC++2008, libgfl290 & WIN32 macro

Post by Ralf »

no, vc defines _WIN32 internally but not WIN32
here's what i do in my code so i don't have to add WIN32 manually to the project files

Code: Select all

#if defined(_WIN32) && !defined(WIN32)  // gah!!
#define WIN32
#endif
#ifdef _WIN32
# include "../3rd_party_software/GflSDK/GflSDK-win/include/libgfl.h"
#else
# include "../3rd_party_software/GflSDK/GflSDK-lin/include/libgfl.h"
#endif
Zai++
Posts: 21
Joined: Fri Nov 18, 2005 4:57 pm
Location: Moscow

Re: VC++2008, libgfl290 & WIN32 macro

Post by Zai++ »

thanks :)