mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mingw-cross-env-list] Qt built with mingw does not define Q_WS_WIN


From: Nikos Chantziaras
Subject: [Mingw-cross-env-list] Qt built with mingw does not define Q_WS_WIN
Date: Sat, 27 Mar 2010 23:26:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100322 Thunderbird/3.0.3

After Qt was successfully built, I tried to build my Qt app with it. I have code that needs to work different on Windows, and I check it with:

  #ifndef Q_WS_WIN
  // Unix-only code...
  #endif

However, the Q_WS_WIN macro is not defined and compilation fails. I'm trying to build the project with:

  i686-pc-mingw32-qmake
  make

This results in the following. Note that the definition of "memicmp" is what Q_WS_WIN is needed for.


make -f Makefile.Debug
make[1]: Entering directory `/home/realnc/tmp/qtads'
i686-pc-mingw32-gcc -c -isystem /home/realnc/opt/mingw/usr/i686-pc-mingw32/include -pipe -g -O0 -Wall -Wno-unused-parameter -DUNICODE -DQT_TABLET -DQT_SESSIONMANAGER -DQT_NO_DIRECT3D -DQT_NO_CODECS -DHTMLQT -DTROLLTECH_QT -D_M_PPC -DUSE_HTML -DVMGLOB_VARS -DT3_COMPILING_FOR_HTML -DOS_NO_TYPES_DEFINED -DVM_STACK_SIZE=65536 -DVM_STACK_RESERVE=1024 -DVM_UNDO_MAX_RECORDS=65536 -DVM_UNDO_MAX_SAVEPTS=255 -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"../../opt/mingw/usr/i686-pc-mingw32/include/QtCore" -I"../../opt/mingw/usr/i686-pc-mingw32/include/QtGui" -I"/home/realnc/opt/mingw/usr/i686-pc-mingw32/include/phonon" -I"../../opt/mingw/usr/i686-pc-mingw32/include" -I"src" -I"tads2" -I"tads3" -I"htmltads" -I"../../opt/mingw/usr/i686-pc-mingw32/include/ActiveQt" -I"/home/realnc/opt/mingw/usr/i686-pc-mingw32/include/phonon_compat" -I"tmp" -I"tmp" -I"." -I"../../opt/mingw/usr/i686-pc-mingw32/mkspecs/win32-g++" -o obj/oemqt.o src/oemqt.c
In file included from src/osqt.h:55,
                 from tads2/os.h:176,
                 from tads2/lib.h:32,
                 from tads2/std.h:28,
                 from src/oemqt.c:22:
src/missing.h:42: error: conflicting types for 'memicmp'
/home/realnc/opt/mingw/usr/i686-pc-mingw32/include/string.h:91: note: previous declaration of 'memicmp' was here
make[1]: *** [obj/oemqt.o] Error 1
make[1]: Leaving directory `/home/realnc/tmp/qtads'
make: *** [debug] Error 2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]