<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>I looked at all the generated executables and DLLs with Dependency Walker; it said all of them were built for x86. The issue is that the assemblygen executable is being built with the default value for /platform, which is "anycpu". I hacked lines 166 and 268 of cmake/modules/CMakeCSharpInformation.cmake to add "/platform:x86" and got past this.<br></span></div><div><br><span></span></div><div><span>Now assemblygen runs, the Q_PROPERTY strings aren't garbage, and the code generated looks OK...but the C# compiler dies with what appears to be bogus errors:</span></div><div><br></div><div>[...]bxq-dqos.19.cs(31,39) : error CS1031: Type expected<br>[...]\bxq-dqos.19.cs(31,59) : error CS1002: ; expected<br>[...]\bxq-dqos.19.cs(32,20) : error CS1519: Invalid token ')' in class, struct, or interface member
declaration<br>[...]\bxq-dqos.19.cs(33,16) : error CS1519: Invalid token '(' in class, struct, or interface member declaration<br>[...]\bxq-dqos.19.cs(36,2) : error CS1022: Type or namespace definition, or end-of-file expected<br><span></span></div><div><br><span></span></div><div>Unfortunately, the temporary file mentioned in the error messages is gone before I can look at it. <span>I assume it's compiling assemblygen-build/bin/qyoto-qtcore.cs, but the affected lines don't appear to have any problem. Here's a snippet of the code in the area:</span></div><div><br><span></span></div><div><span> 16 [SmokeClass("QAbstractAnimation")]^M<br> 17 public abstract partial class QAbstractAnimation : QObject, System.IDisposable {^M<br> 18 ^M<br>
19 static SmokeInvocation staticInterceptor = new SmokeInvocation(typeof(QAbstractAnimation), null);^M<br> 20 ^M<br> 21 protected QAbstractAnimation(System.Type dummy) : ^M<br> 22 base((System.Type) null) {^M<br> 23 }^M<br> 24 ^M<br> 25 [SmokeMethod("QAbstractAnimation()")]^M<br> 26 public QAbstractAnimation() : ^M<br>
27 this((System.Type) null) {^M<br> 28 object[] smokeArgs = new object[0];^M<br> 29 this.CreateProxy();^M<br> 30 this.interceptor.Invoke("QAbstractAnimation", "QAbstractAnimation()", typeof(void), false, smokeArgs);^M<br> 31 }^M<br> 32 ^M<br> 33 [SmokeMethod("QAbstractAnimation(QObject*)")]^M<br>
34 public QAbstractAnimation(QObject arg1) : ^M<br> 35 this((System.Type) null) {^M<br> 36 object[] smokeArgs = new object[] {^M<br> 37 typeof(QObject),^M<br> 38 arg1};^M<br> 39 this.CreateProxy();^M<br> 40
this.interceptor.Invoke("QAbstractAnimation#", "QAbstractAnimation(QObject*)", typeof(void), false, smokeArgs);<br> 41 }^M</span></div><div><br></div><div><span>Has anyone else run into this, or know what the problem is?</span></div><div><br><span></span></div><div><span>Steven Boswell<br></span></div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Dimitar Dobrev <dpldobrev@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> Steven Boswell II <ulatekh@yahoo.com>; KDE bindings for other programming languages <kde-bindings@kde.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Monday, December 12, 2011 1:13
AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Kde-bindings] Building "assemblies" branch of assemblygen under Windows<br> </font> <br>
<div id="yiv660840783"><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt;"><div><span>I guess you are using a 64-bit Windows, like me. The solution is to create a VS/MonoDevelop project, include all files of assemblygen but without the plugins, build for x86 and place the result in your CMake directory for "binaries",<br></span></div><div><br></div> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"> <div style="font-family:times new roman, new york, times, serif;font-size:12pt;"> <font face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Steven Boswell II <ulatekh@yahoo.com><br> <b><span style="font-weight:bold;">To:</span></b> KDE bindings <kde-bindings@kde.org> <br> <b><span style="font-weight:bold;">Sent:</span></b> Monday, December 12, 2011 2:30 AM<br> <b><span style="font-weight:bold;">Subject:</span></b>
[Kde-bindings] Building "assemblies" branch of assemblygen under Windows<br> </font> <br>
<div id="yiv660840783"><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt;"><div>[...] assemblygen.exe crashes upon startup:</div><div><br></div><div>Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
<br> at MainClass.InitSmoke(String module)
<br> at MainClass.Main(String[] args)</div>[...]<br> </div></div></div></div></div></div></div></div></div> </div> </div></body></html>