[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    Re: [Kde-bindings] building qyoto on Windows
From:       Peter Amstutz <peter.amstutz () tseboston ! com>
Date:       2012-02-14 20:10:42
Message-ID: 4F3ABFC2.2040904 () tseboston ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I've made some additional progress building on Windows.  The most 
frustrating problem was learning the hard way that cmake searches for 
"FindXXX.cmake" and "XXXConfig.cmake" files differently (the former is 
searched for in CMAKE_MODULE_PATH, the latter searches the system 
PATH).  I eventually resolved that.  The second problem is the following 
code from SmokeConfig.cmake (lines 50-62):

   if(WIN32)
             # DLLs are in the bin directory.
             find_library(SMOKE_${uppercase}_LIBRARY
                 smoke${lowercase}
                 PATHS "e:/development/smokegenerator/bin"
                 NO_DEFAULT_PATH)
         else(WIN32)
             find_library(SMOKE_${uppercase}_LIBRARY
                 smoke${lowercase}
                 PATHS "e:/development/smokegenerator/lib"
                 NO_DEFAULT_PATH)
         endif(WIN32)

This is wrong, because CMake is searching for files in the form 
smokeqtcore.lib, which are in lib/.  The special case for Windows to 
search bin/ should be removed.

Next, I removed references to smokeqttest which did not build.  At this 
point I was able to configure and generate VS 2008 project files 
successfully.

When I built the solution, I encountered some problems in 
src/handlers.cpp (lines 1669-1672)
DEF_VALUELIST_MARSHALLER( QSslCertificateList, QList<QSslCertificate>, 
QSslCertificate )
DEF_VALUELIST_MARSHALLER( QSslCipherList, QList<QSslCipher>, QSslCipher )
DEF_VALUELIST_MARSHALLER( QSslErrorList, QList<QSslError>, QSslError )

These symbols were not available for some reason, so I commented them out.

Finally I was able to build all the C++ projects.  However there are no 
.csproj files generated by cmake?!  How do I build the C# parts of Qyoto 
and the example applications?

Thanks,
Peter

On 2/14/2012 11:19 AM, Dimitar Dobrev wrote:
> While it's not the greatest news that QtTest fails, it isn't essential at all. No \
> other Qt lib depends on it and .NET unit testing is performed using other tools \
> (like NUnit) anyway. Good luck onwards.
> 
> 
> 
> ________________________________
> From: Peter Amstutz<peter.amstutz@tseboston.com>
> To: Kde-bindings@kde.org
> Sent: Tuesday, February 14, 2012 6:05 PM
> Subject: [Kde-bindings] building qyoto on Windows
> 
> Hello all,
> 
> I am trying to build Qyoto on Windows.  I understand that this is working for some \
> people, but the process isn't quite flawless.  Here are my experiences so far: 
> Doing a 32 bit build with Visual Studio 2008 on Windows 7 (x64).  I am using Qt \
> 2.7.4 on the assumption that it would be better supported than Qt 2.8.0 which was \
> only released last week.  I built Qt myself from the open source release. 
> Building Smokegen went smoothly.  I had to set CMAKE_INSTALL_PREFIX manually in \
> order to install smokegen to a target directory. 
> Building SmokeQt has been more difficult.  The first problem I had was in having it \
> find Smoke; this was resolved by installing smoke to a separate directory.  It \
> turns out you cannot build SmokeQt against the Smoke build tree; only the installed \
> tree. 
> The second problem was the following error:
> 
> Entering E:/Development/smokeqt/qtcore
> CMake Error at qtcore/QtGuess.txt:139 (list):
> list sub-command REMOVE_ITEM requires two or more arguments.
> Call Stack (most recent call first):
> qtcore/CMakeLists.txt:14 (include)
> 
> The error at qtcore/QtGuess.txt:139 is this:
> list(REMOVE_ITEM test_targets ${qtdefines_output})
> this can be fixed:
> list(REMOVE_ITEM test_targets "${qtdefines_output}")
> 
> This produces an empty string instead of no string.
> 
> This underlying problem is that ${qtdefines_output} is empty.  This variable is \
> empty because the qtdefine test program produces no output.  It produces no output \
> because there are no printf() lines are present in qtdefine.cpp. There are no \
> printf() lines because ${qtheaders} is expected to contain #define lines, but does \
> not.  It does not contain any #define lines because \
> ${QT_QTCORE_INCLUDE_DIR}/qglobal.h simply #includes \
> "../../src/corelib/global/qglobal.h" rather than being the "real" qglobal file \
> which the current code expects to find.  Confused yet? 
> I'm not sure if qtdefine actually affects anything, as the script then proceeds to \
> test directly for #defines for the features it cares about.  I think this part of \
> the build script could use some attention from someone who knows more about what it \
> is going on. 
> Finally I am able to run the configuration step without any fatal errors, and \
> generate correct solution files.  Everything builds except smokeqttest with the \
> following error.  Is smokeqttest an essential project? 
> 1>------ Build started: Project: smokeqttest, Configuration: Release Win32 ------
> 1>Linking...
> 1>    Creating library E:\Development\smokeqt\build\qttest\Release\smokeqttest.lib \
> and object E:\Development\smokeqt\build\qttest\Release\smokeqttest.exp 1>x_1.obj : \
> error LNK2019: unresolved external symbol "public: static struct QMetaObject const \
> QTestEventLoop::staticMetaObject" \
> (?staticMetaObject@QTestEventLoop@@2UQMetaObject@@B) referenced in function \
> "public: static class QString __cdecl QTestEventLoop::tr(char const *,char const \
> *)" (?tr@QTestEventLoop@@SA?AVQString@@PBD0@Z) \
> 1>E:\Development\smokeqt\build\qttest\Release\smokeqttest.dll : fatal error \
> LNK1120: 1 unresolved externals 1>Build log was saved at \
> "file://e:\Development\smokeqt\build\qttest\smokeqttest.dir\Release\BuildLog.htm" \
> 1>smokeqttest - 2 error(s), 0 warning(s) 
> Assuming smokeqttest is not essential, my next step will be to try to build qyoto.
> 
> -- Peter Amstutz
> Senior Software Engineer
> Technology Solutions Experts
> Natick, MA
> 02131
> 
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings@kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
> 
> 
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings@kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings


-- 
Peter Amstutz
Senior Software Engineer
Technology Solutions Experts
Natick, MA
02131


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi, <br>
    <br>
    I've made some additional progress building on Windows.&nbsp; The most
    frustrating problem was learning the hard way that cmake searches
    for "FindXXX.cmake" and "XXXConfig.cmake" files differently (the
    former is searched for in CMAKE_MODULE_PATH, the latter searches the
    system PATH).&nbsp; I eventually resolved that.&nbsp; The second problem is
    the following code from SmokeConfig.cmake (lines 50-62):<br>
    <br>
    &nbsp; if(WIN32)<br>
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # DLLs are in the bin \
directory.<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
find_library(SMOKE_${uppercase}_LIBRARY<br>  \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
smoke${lowercase}<br>  \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
PATHS "e:/development/smokegenerator/bin"<br>  \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
NO_DEFAULT_PATH)<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else(WIN32)<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
find_library(SMOKE_${uppercase}_LIBRARY<br>  \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
smoke${lowercase}<br>  \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
PATHS "e:/development/smokegenerator/lib"<br>  \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
NO_DEFAULT_PATH)<br>  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endif(WIN32)<br>
    <br>
    This is wrong, because CMake is searching for files in the form
    smokeqtcore.lib, which are in lib/.&nbsp; The special case for Windows to
    search bin/ should be removed.<br>
    <br>
    Next, I removed references to smokeqttest which did not build.&nbsp; At
    this point I was able to configure and generate VS 2008 project
    files successfully.&nbsp; <br>
    <br>
    When I built the solution, I encountered some problems in
    src/handlers.cpp (lines 1669-1672)<br>
    DEF_VALUELIST_MARSHALLER( QSslCertificateList,
    QList&lt;QSslCertificate&gt;, QSslCertificate )<br>
    DEF_VALUELIST_MARSHALLER( QSslCipherList, QList&lt;QSslCipher&gt;,
    QSslCipher )<br>
    DEF_VALUELIST_MARSHALLER( QSslErrorList, QList&lt;QSslError&gt;,
    QSslError )<br>
    <br>
    These symbols were not available for some reason, so I commented
    them out.<br>
    <br>
    Finally I was able to build all the C++ projects.&nbsp; However there are
    no .csproj files generated by cmake?!&nbsp; How do I build the C# parts
    of Qyoto and the example applications?<br>
    <br>
    Thanks,<br>
    Peter<br>
    <br>
    On 2/14/2012 11:19 AM, Dimitar Dobrev wrote:
    <blockquote
      cite="mid:1329236373.21519.YahooMailNeo@web125904.mail.ne1.yahoo.com"
      type="cite">
      <pre wrap="">While it's not the greatest news that QtTest fails, it isn't \
essential at all. No other Qt lib depends on it and .NET unit testing is performed \
using other tools (like NUnit) anyway. Good luck onwards.



________________________________
 From: Peter Amstutz <a class="moz-txt-link-rfc2396E" \
                href="mailto:peter.amstutz@tseboston.com">&lt;peter.amstutz@tseboston.com&gt;</a>
                
To: <a class="moz-txt-link-abbreviated" \
                href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a> 
Sent: Tuesday, February 14, 2012 6:05 PM
Subject: [Kde-bindings] building qyoto on Windows
 
Hello all,

I am trying to build Qyoto on Windows.&nbsp; I understand that this is working for \
some people, but the process isn't quite flawless.&nbsp; Here are my experiences so \
far:

Doing a 32 bit build with Visual Studio 2008 on Windows 7 (x64).&nbsp; I am using Qt \
2.7.4 on the assumption that it would be better supported than Qt 2.8.0 which was \
only released last week.&nbsp; I built Qt myself from the open source release.

Building Smokegen went smoothly.&nbsp; I had to set CMAKE_INSTALL_PREFIX manually in \
order to install smokegen to a target directory.

Building SmokeQt has been more difficult.&nbsp; The first problem I had was in having \
it find Smoke; this was resolved by installing smoke to a separate directory.&nbsp; \
It turns out you cannot build SmokeQt against the Smoke build tree; only the \
installed tree.

The second problem was the following error:

Entering E:/Development/smokeqt/qtcore
CMake Error at qtcore/QtGuess.txt:139 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
qtcore/CMakeLists.txt:14 (include)

The error at qtcore/QtGuess.txt:139 is this:
&nbsp; list(REMOVE_ITEM test_targets ${qtdefines_output})
this can be fixed:
&nbsp; list(REMOVE_ITEM test_targets "${qtdefines_output}")

This produces an empty string instead of no string.

This underlying problem is that ${qtdefines_output} is empty.&nbsp; This variable is \
empty because the qtdefine test program produces no output.&nbsp; It produces no \
output because there are no printf() lines are present in qtdefine.cpp. There are no \
printf() lines because ${qtheaders} is expected to contain #define lines, but does \
not.&nbsp; It does not contain any #define lines because \
${QT_QTCORE_INCLUDE_DIR}/qglobal.h simply #includes \
"../../src/corelib/global/qglobal.h" rather than being the "real" qglobal file which \
the current code expects to find.&nbsp; Confused yet?

I'm not sure if qtdefine actually affects anything, as the script then proceeds to \
test directly for #defines for the features it cares about.&nbsp; I think this part \
of the build script could use some attention from someone who knows more about what \
it is going on.

Finally I am able to run the configuration step without any fatal errors, and \
generate correct solution files.&nbsp; Everything builds except smokeqttest with the \
following error.&nbsp; Is smokeqttest an essential project?

1&gt;------ Build started: Project: smokeqttest, Configuration: Release Win32 ------
1&gt;Linking...
1&gt;&nbsp;  Creating library \
E:\Development\smokeqt\build\qttest\Release\smokeqttest.lib and object \
E:\Development\smokeqt\build\qttest\Release\smokeqttest.exp 1&gt;x_1.obj : error \
LNK2019: unresolved external symbol "public: static struct QMetaObject const \
QTestEventLoop::staticMetaObject" \
(?staticMetaObject@QTestEventLoop@@2UQMetaObject@@B) referenced in function "public: \
static class QString __cdecl QTestEventLoop::tr(char const *,char const *)" \
(?tr@QTestEventLoop@@SA?AVQString@@PBD0@Z) \
1&gt;E:\Development\smokeqt\build\qttest\Release\smokeqttest.dll : fatal error \
LNK1120: 1 unresolved externals 1&gt;Build log was saved at <a \
class="moz-txt-link-rfc2396E" \
href="file://e:\Development\smokeqt\build\qttest\smokeqttest.dir\Release\BuildLog.htm" \
>"file://e:\Development\smokeqt\build\qttest\smokeqttest.dir\Release\BuildLog.htm"</a>
> 
1&gt;smokeqttest - 2 error(s), 0 warning(s)

Assuming smokeqttest is not essential, my next step will be to try to build qyoto.

-- Peter Amstutz
Senior Software Engineer
Technology Solutions Experts
Natick, MA
02131

_______________________________________________
Kde-bindings mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a> <a \
class="moz-txt-link-freetext" \
href="https://mail.kde.org/mailman/listinfo/kde-bindings">https://mail.kde.org/mailman/listinfo/kde-bindings</a>
 </pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kde-bindings mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a> <a \
class="moz-txt-link-freetext" \
href="https://mail.kde.org/mailman/listinfo/kde-bindings">https://mail.kde.org/mailman/listinfo/kde-bindings</a>
 </pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Peter Amstutz
Senior Software Engineer
Technology Solutions Experts
Natick, MA
02131
</pre>
  </body>
</html>



_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic