AW: kdelibs compile problem with vcexpress

Nhuh Put nhuh.put at web.de
Tue Aug 28 19:48:17 CEST 2007


> -----Ursprüngliche Nachricht-----
> Von: Ralf Habacker
> Gesendet: Dienstag, 28. August 2007 19:33
> An: KDE on Windows
> Betreff: kdelibs compile problem with vcexpress
> 
> Hi,
> 
> i encountered a compile problem with vcexpress++ 2005, qt4.3.1 and
> recent kdelibs in kdeui/xmlgui/ktoolbarhandler.cpp.
> 
> d:\programme\kdewin-msvc\include\qtcore\qlinkedlist.h(110) : error
> C2146: syntax error : missing ';' before identifier 'difference_type'
> d:\programme\kdewin-msvc\include\qtcore\qlinkedlist.h(107) : see
> reference to class template instantiation 'QLinkedList<T>::iterator'
> being compiled
> d:\programme\kdewin-msvc\include\qtcore\qlinkedlist.h(241) : see
> reference to class template instantiation 'QLinkedList<T>' being compiled
> d:\programme\kdewin-msvc\include\qtcore\qlinkedlist.h(110) : error
> C4430: missing type specifier - int assumed. Note: C++ does not support
> default-int
> d:\programme\kdewin-msvc\include\qtcore\qlinkedlist.h(110) : error
> C4430: missing type specifier - int assumed. Note: C++ does not support
> default-int
> 
> The problem is that there are problems with the definition of ptrdiff_t
> 
> The workaround i found was to prepend the following code before any
> header was included.
> 
> 
> #if _MSC_VER == 1400
> typedef int ptrdiff_t;
> #define _PTRDIFF_T_DEFINED
> #endif
> 
> #include "ktoolbarhandler.h"
> 
> It looks like a problem with some cryptic _W64 and __w64 definitions
> problems, but unfortunally it looks that msvc does not have an option
> likes gcc -save-temps to get the preprocessed output.

Add /P to the command line. It should safe the pre-processor output to
<filename>.i. An additional /EP removes the line numbers.

The /Wp64 enables some 64 bit compatibility stuff, try to remove it, if you
have it in your command line.

> 
> Does anyone have an idea how to solve this better ?
> 
> Ralf
> 
> _______________________________________________
> 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