Closed GoogleCodeExporter closed 9 years ago
The issue report mention checking out openjpeg from svn , but the bug report
contains code from third party app: ITK.
You need to check directly with ITK people about there custom version of
openjpeg. Our openjpeg compiles with mingw (w32 & w64).
Original comment by mathieu.malaterre
on 23 Jun 2014 at 7:25
Hi Mathieu,
I also check out sources from this svn and got the same error. I can post that
error message also.
Original comment by mohammed...@gmail.com
on 23 Jun 2014 at 7:29
Post the correct compilation output, please.
Original comment by mathieu.malaterre
on 23 Jun 2014 at 7:34
[deleted comment]
Using version.2.1 from svn with default cmake options I get:
C:\Users\jf\delmoi\openjpeg-build>mingw32-make
Scanning dependencies of target openjp2
[ 2%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/bio.c.obj
[ 5%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/cio.c.obj
[ 8%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/dwt.c.obj
[ 11%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/event.c.obj
[ 14%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/image.c.obj
[ 17%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/invert.c.obj
[ 20%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/j2k.c.obj
[ 22%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/jp2.c.obj
[ 25%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/mct.c.obj
[ 28%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/mqc.c.obj
[ 31%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/openjpeg.c.obj
C:\Users\jf\delmoi\openjpeg-read-only\src\lib\openjp2\openjpeg.c:135:1: error:
conflicting types for 'DllMain'
DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
^
In file included from c:\mingw\include\windows.h:62:0,
from C:\Users\jf\delmoi\openjpeg-read-only\src\lib\openjp2\openjpeg.c:35:
c:\mingw\include\winbase.h:1051:13: note: previous declaration of 'DllMain' was
here
BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID);
^
src\lib\openjp2\CMakeFiles\openjp2.dir\build.make:294: recipe for target
'src/lib/openjp2/CMakeFiles/openjp2.dir/openjpeg.c.obj' failed
mingw32-make[2]: *** [src/lib/openjp2/CMakeFiles/openjp2.dir/openjpeg.c.obj]
Error 1
CMakeFiles\Makefile2:91: recipe for target
'src/lib/openjp2/CMakeFiles/openjp2.dir/all' failed
mingw32-make[1]: *** [src/lib/openjp2/CMakeFiles/openjp2.dir/all] Error 2
Makefile:136: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
Replacing openjpeg.c:135 with
DllMain(HINSTANCE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
instead of the original
DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
seemed to solve this issue with mingw gcc 4.8.1
Original comment by jf.pamb...@gmail.com
on 25 Jun 2014 at 2:16
Another workaround if to add an ifndef guard for mingw
#if !defined(OPJ_STATIC) && !defined(__MINGW32__)
Original comment by mohammed...@gmail.com
on 25 Jun 2014 at 2:38
This issue was closed by revision r2878.
Original comment by antonin
on 16 Sep 2014 at 3:38
Original issue reported on code.google.com by
mohammed...@gmail.com
on 22 Jun 2014 at 11:08