[Qgis-developer] compilation error

Byambaa Mendbayar mendbayar_b at mongol.net
Fri May 11 09:40:47 EDT 2007


Dear Martin,

Thanks a lot for your quick reply. I will check ever thing which are
mentioned by you. Thank you again for your warm reply.  

Best regards,
Byambaa Mendbayar

-----Original Message-----
From: Martin Dobias [mailto:wonder.sk at gmail.com] 
Sent: Friday, May 11, 2007 8:39 PM
To: mendbayar_b at mongol.net
Cc: qgis-developer at lists.qgis.org
Subject: Re: [Qgis-developer] compilation error

On 5/11/07, Byambaa Mendbayar <mendbayar_b at mongol.net> wrote:
> Dear all,
>
> I had tried to compile latest SVN head. But it wasn't working. I have
> getting following error messages.
>
> =================================================================
> D:\devel\workplace\unstable\qgis_head\build>make
> [  0%] Built target svnversion
> [  8%] Built target ui
> [  8%] Building CXX object
> src/core/CMakeFiles/qgis_core.dir/qgsdistancearea.obj
>
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp: In
> member fu
> nction `double QgsDistanceArea::computeDistanceBearing(const QgsPoint&,
> const Qg
> sPoint&, double*, double*)':
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:443:
> warning:
>  'sinLambda' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:443:
> warning:
>  'cosLambda' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:443:
> warning:
>  'sinSigma' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:443:
> warning:
>  'cosSigma' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:444:
> warning:
>  'sigma' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:444:
> warning:
>  'cosSqAlpha' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:444:
> warning:
>  'cos2SigmaM' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:445:
> warning:
>  'tu1' might be used uninitialized in this function
> d:\devel\workplace\unstable\qgis_head\src\core\qgsdistancearea.cpp:445:
> warning:
>  'tu2' might be used uninitialized in this function
> mingw32-make[2]: ***
[src/core/CMakeFiles/qgis_core.dir/qgsdistancearea.obj]
> Err
> or 1
> mingw32-make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> D:\devel\workplace\unstable\qgis_head\build>

Hi,

I see only warnings there - open CMakeSetup and set variable PEDANTIC
to FALSE so that warnings won't be treated as errors.

> =================================================================
>
> I was following README_windows.txt instruction; I mean I was using "MinGW
> Makefiles" option when it was arise in CMAKESETUP.exe
>
> Also I have leak in compiling 0.8 branches.
> ================================================================
> ext+0x1003):misc.c: undefined reference to `InitializeCriticalSection at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x102b):misc.c: undefined reference to `EnterCriticalSection at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x1068):misc.c: undefined reference to `LeaveCriticalSection at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x121d):misc.c: undefined reference to `Sleep at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x123b):misc.c: undefined reference to `Sleep at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x125a):misc.c: undefined reference to `EnterCriticalSection at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x1294):misc.c: undefined reference to `LeaveCriticalSection at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x12b8):misc.c: undefined reference to `InterlockedExchange at 8'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x12d4):misc.c: undefined reference to `InitializeCriticalSection at 4'
>
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../libmingwex.a(misc.o
> )(.t
> ext+0x12fd):misc.c: undefined reference to `EnterCriticalSection at 4'
> collect2: ld returned 1 exit status
> mingw32-make[2]: *** [src/core/libqgis_core.dll] Error 1
> mingw32-make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
> mingw32-make: *** [all] Error 2
>
> D:\devel\workplace\stable\qgis_0.8.1\build>

I don't know what's up with this - isn't this because of mixture of
different installations of MinGW? It looks like linker is trying to
use libmingwex.a from
D:/devel/bin/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../ however I
think it should use stuff from c:/msys/mingw. Please check your paths.

Also, on problems it's good idea to use run make in verbose mode:
make VERBOSE=1
This way, it will also show commands it executes and not only their
output. This is much more helpful than just the error message you'll
get.

Regards
Martin





More information about the Qgis-developer mailing list