Problem compiling Digikam with mingw

Francis Corvin francis_ at gmx.net
Sat Oct 30 15:52:13 CEST 2010


Gilles,

Belated thanks for your answer. I tried again today: MinGW has been 
completely removed from the system (and it had been before). I have 
now three folders:
- E:\dev-tdmgcc where I instaled TDM-GCC and also downloaded the 
source code via Subversion
- E:\kde4-tdmgcc which is my KDE installation directory
- E:\kde4-tdmgcc-dl which is the KDE download directory

I still have the same problem:
In file included from E:\kde4-tdmgcc\include/lcms.h:185:0,
                  from 
E:\dev-tdmgcc\kdegraphics\libs\libkdcraw\libraw/internal/defines.h:54,
                  from 
E:\dev-tdmgcc\kdegraphics\libs\libkdcraw\libraw\internal\dcraw_common.cpp:29:
E:\kde4-tdmgcc\include\mingw/unistd.h:119:44:
error: declaration of C function 'void usleep(unsigned int)' conflicts with
E:\dev-tdmgcc\kdegraphics/../include/unistd.h:36:29:
error: previous declaration 'int usleep(useconds_t)' here

So it is a conflict between TDM GCC and the KDE libraries and their headers.

When I installed TDM GCC, I chose the MinGW 32 bit option (I cannot 
link exiv2.dll.a with the 64-bit version; I am using WIndows XP). Is 
that the correct choice? Do you remember how you fixed your problem?

Francis

At 2010-10-26 13:17, Gilles Caulier wrote:
>I remember to have seen this problem in the past, just when i switch
>from mingw to TDM-GCC.
>
>It look like mingw header still present in your system somewhere and
>come in conflict with TDM-GCC header.
>
>remove mingw properly will solve this problem.
>
>If you have installed mingw using emerge, no chnage : all file are
>merged with you KDE windows install.
>
>Personalyy, i install TDM-GCC in C:/TDM-GCC/ (not C:/MINGW).
>
>Respect TDM-GCC tips from this page :
>
>http://tdm-gcc.tdragon.net/start#install
>
>Here all compilation work fine indeep. I'm happy.
>
>http://www.flickr.com/photos/digikam/5067133639/sizes/o/in/photostream/
>
>Note : I use also M$ MSVC compiler on the same machine. I install 2
>KDE4 version on my computer, and to select right path, i use a simple
>M$ shell script to init env on the console.
>
>The advange to have both compiler at the same time is to check
>warnings and errors, which are very instructive under MSVC. I don't
>want to said that MSVC is better than GCC. Sometime yes sometime no.
>
>The next stage for me is to setup a developement env under my new
>macbook and check if all work fine with Apple XCode compiler.
>
>Gilles Caulier
>
>2010/10/25 Francis Corvin <francis_ at gmx.net>:
> > That''s great Gilles. Indeed, I went a little further, but this time hit
> > what looks like a source code issue: usleep() declared twice with different
> > types. Can anyone suggest a resolution?
> >
> > Thanks in advance,
> >
> > Francis
> >
> > [ 12%] Building CXX object
> > 
> libs/libkdcraw/libkdcraw/CMakeFiles/kdcraw.dir/__/libraw/internal/dcraw_common.obj
> > In file included from
> > 
> e:\kde4-tdmgcc\bin\../lib/gcc/mingw32/4.5.1/../../../../include/lcms.h:185:0,
> >                  from
> > E:\dev-dmgcc\kdegraphics\libs\libkdcraw\libraw/internal/defines.h:54,
> >                  from
> > 
> E:\dev-tdmgcc\kdegraphics\libs\libkdcraw\libraw\internal\dcraw_common.cpp:29:
> > E:\kde4-tdmgcc\include\mingw/unistd.h:119:44:
> > error: declaration of C function 'void usleep(unsigned int)' conflicts with
> > 
> e:\kde4-tdmgcc\bin\../lib/gcc/mingw32/4.5.1/../../../../include/../include/unistd.h:36:29:
> > error: previous declaration 'int usleep(useconds_t)' here
> > make[2]: ***
> > 
> [libs/libkdcraw/libkdcraw/CMakeFiles/kdcraw.dir/__/libraw/internal/dcraw_common.obj]
> > Error 1
> > make[1]: *** [libs/libkdcraw/libkdcraw/CMakeFiles/kdcraw.dir/all] Error 2
> > make: *** [all] Error 2
> >
> > At 2010-10-24 11:57, Gilles Caulier wrote:
> >
> > Tutorial is not updated. I recommend to use TDM-GCC instead mingw. It
> > work very well and it's very easy to install. Also, TDM-GCC it GCC
> > 4.5.x.
> >
> > Gilles Caulier
> >
> > _______________________________________________
> > Kde-windows mailing list
> > Kde-windows at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-windows
> >
> >
>_______________________________________________
>Kde-windows mailing list
>Kde-windows at kde.org
>https://mail.kde.org/mailman/listinfo/kde-windows



More information about the Kde-windows mailing list