Closed GoogleCodeExporter closed 9 years ago
1. Please make the following change and report whether the change works:
#if defined(sun)
#pragma pack(1)
#else
#pragma pack(push, 1)
#endif
//TGA structure
#if defined(sun)
#pragma pack()
#else
#pragma pack(pop)
#endif
2. You use a 'new' libpng library version. The 'new' png.h
does no longer '#include <zlib.h>'. Please enter in
convert.c :
#include <png.h>
#include <zlib.h>
3. If you have 'svn' installed: please try to download the newest
OpenJPEG-1.4.0 revision with:
svn checkout http://openjpeg.googlecode.com/svn/trunk openjpeg
The newest revision 787 has many bugs fixed.
The PRAGMA change you must add even in revision 787.
The ZLIB change is contained in revision 787.
If you use 'configure': you must call 'bootstrap.sh' to get
a working 'configure'.
winfried
Original comment by szukw...@arcor.de
on 16 Jun 2011 at 4:34
As Alasdair - unfortunately - is a tourist, I have looked up some files.
The GCC testsuite files use '__sun__', whereas the file
http://developers.sun.com/sunstudio/documentation/ss12u1/mr/READMEs/c++_faq.html
uses '__sun'.
The simplest solutution seems to be:
#if defined(__sun) || defined(__sun__)
#pragma pack(1)
#else
#pragma pack(push, 1)
#endif
//TGA structure
#if defined(__sun) || defined(__sun__)
#pragma pack()
#else
#pragma pack(pop)
#endif
winfried
Original comment by szukw...@arcor.de
on 18 Jun 2011 at 11:18
Hi,
Thank you very much for looking into this, it's very much appreciated!
I will give the above suggestions a go and get back to you shortly.
Cheers,
Alasdair
Original comment by alasd...@apps.everycity.co.uk
on 21 Jun 2011 at 9:39
Hi,
The above changes have fixed the app and it now builds. I had to make some
other modifications too, which can be found here:
http://pastie.org/pastes/2101568/text?key=dxwcwnrncgtvkaxttida
Thanks for your help with this! :-)
Cheers,
Alasdair
Original comment by alasd...@apps.everycity.co.uk
on 21 Jun 2011 at 2:21
the #define must not be done on the architecture, but the compiler. In
addition, these pragma directives might not run on some compilers. Here is an
example of what I used (must be modified for this issue) :
#if defined (_MSC_VER) || (defined (__SUNPRO_C) && __SUNPRO_C < 0x5100)
# pragma pack(1)
# define EMBRYO_STRUCT_PACKED
#elif defined (__GNUC__) || (defined (__SUNPRO_C) && __SUNPRO_C >= 0x5100)
# define EMBRYO_STRUCT_PACKED __attribute__((packed))
#else
# define EMBRYO_STRUCT_PACKED
#endif
Vincent
Original comment by vincent....@gmail.com
on 23 Jul 2011 at 8:57
this issue has been entirely fixed since r907.
Original comment by antonin
on 1 Sep 2011 at 1:10
Original issue reported on code.google.com by
alasd...@apps.everycity.co.uk
on 15 Jun 2011 at 9:16