<div dir="ltr">I am trying to SIP-wrap some things, with various degrees of success, being new to the whole Qt4/PyQt/SIP world. I'm on a Mac. The issue I am running into is in trying to wrap a pretty simple C++ function, which looks like this:<div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">bool</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">InitializeApplication</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">QString</span><span style="color:rgb(192,192,192)"> </span>applicationName<span style="color:rgb(0,0,0)">);</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:arial;white-space:normal"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0);white-space:normal"><font face="arial">The issue appears to be some kind of mismatch (toolchain? Qt version? I'm not sure) between the Qt library which would define a SIP wrapper for QString, and my own stuff. The error message looks like this.</font></span></pre></div><div><div style><font face="courier new, monospace">Thread 0 Crashed:: Dispatch queue: com.apple.main-thread</font></div><div style><font face="courier new, monospace">0 ??? <span class="" style="white-space:pre"> </span>0x000000bb0000024d 0 + 803158884941</font></div><div style><font face="courier new, monospace">1 sip.so <span class="" style="white-space:pre"> </span>0x000000010ebc4140 sip_api_convert_to_type + 245</font></div><div style><font face="courier new, monospace">2 sip.so <span class="" style="white-space:pre"> </span>0x000000010ebce0b5 parsePass2 + 3985</font></div><div style><font face="courier new, monospace">3 sip.so <span class="" style="white-space:pre"> </span>0x000000010ebcadb6 parseKwdArgs + 322</font></div><div style><font face="courier new, monospace">4 sip.so <span class="" style="white-space:pre"> </span>0x000000010ebc81f9 sip_api_parse_args + 151</font></div><div style><font face="courier new, monospace">5 etools.so <span class="" style="white-space:pre"> </span>0x000000010db50ee4 func_InitializeApplication(_object*, _object*) + 116 (.sipetoolscmodule.cpp:192)</font></div><div style><font face="courier new, monospace">6 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d7d914d PyEval_EvalFrameEx + 8080</font></div><div style><font face="courier new, monospace">7 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d7d7093 PyEval_EvalCodeEx + 1641</font></div><div style><font face="courier new, monospace">8 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d7d6a24 PyEval_EvalCode + 54</font></div><div style><font face="courier new, monospace">9 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d7f5c2c 0x10d757000 + 650284</font></div><div style><font face="courier new, monospace">10 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d7f5cd3 PyRun_FileExFlags + 137</font></div><div style><font face="courier new, monospace">11 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d7f5821 PyRun_SimpleFileExFlags + 718</font></div><div style><font face="courier new, monospace">12 org.python.python <span class="" style="white-space:pre"> </span>0x000000010d806363 Py_Main + 2995</font></div><div style><font face="courier new, monospace">13 libdyld.dylib <span class="" style="white-space:pre"> </span>0x00007fff8830d5fd start + 1</font></div></div><div style><br></div><div style>Apparently the Mac is a GDB-hostile platform, so I've relied on print statements to learn that there is a field called "mtd_cto" defined in siplib/sip.h as part of sipMappedTypeDef, which is a function pointer used to convert a native type (such as QString, in this instance) to a Python object, and the function being pointed to is somehow incompatible with the code I compiled myself.</div><div style><br></div><div style>Has anybody run into anything like this? Any suggestions for a productive avenue of investigation?</div><div style><br></div><div style>Thanks very much,</div><div style>Will Ware</div></div>