[ptx] wxWidgets 2.5.4 and hugin ---> "windows.h : Not such file or
directory"
Franck Barbenoire
fbarbenoire at yahoo.fr
Sat Feb 26 00:20:16 GMT 2005
Hello,
After installing the new release of wxWidgets (2.5.4) on my Linux Slackware
10.1, I got exactly the problem described in this post ("windows.h : Not such
file or directory"):
http://www.email-lists.org/pipermail/ptx/2005-February/003160.html
It turns out that the platform.h file included in wxWidgets defines __INTEL__
symbol when either i386, __i386 or __i386__ is defined:
/*
Hardware platform detection.
VC++ defines _M_xxx symbols.
*/
#if defined(_M_IX86) || defined(i386) || defined(__i386) || defined(__i386__)
#ifndef __INTEL__
#define __INTEL__
#endif
#endif /* x86 */
This didn't exist in the previous 2.5.3 version.
But the panotools.h file from libpano12 (2.7.0.8 and also the CVS) defines the
symbol __Win__ when __INTEL__ is defined :
// Create a definition if we're on a Windows machine:
#ifndef __Win__
#if (defined(MSDOS) || defined(WIN32) || defined(__INTEL__))
#define __Win__ 1
#endif
#endif
and later includes windows.h when __Win__ is defined :
#ifdef __Mac__
...
#else // __Mac__, use ANSI-filefunctions
#ifdef __Win__
#ifndef __NO_SYSTEM__
#include <windows.h> // including this causes problems with libjpeg
#endif
...
#else
#define MAX_PATH_LENGTH 512
#endif
...
#endif
Finally, the result is that ImageCache.cpp from Hugin tries to include
windows.h in PanoramaToolInterface.h:
extern "C" {
#include <pano12/panorama.h>
#include <pano12/filter.h>
}
Here is my quick and dirty fix :
extern "C" {
#ifdef __INTEL__
#define __INTELMEMO__
#undef __INTEL__
#endif
#include <pano12/panorama.h>
#ifdef __INTELMEMO__
#define __INTEL__
#endif
#include <pano12/filter.h>
}
A better fix is needed. Obviously, libpano12 shouldn't define __Win__ when
__INTEL__ is defined.
Thank you for your attention !
Franck Barbenoire
--
---
Ma clé publique PGP : 0xD73F161C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.email-lists.org/pipermail/ptx/attachments/20050226/c610cd73/attachment.htm
More information about the ptX
mailing list