<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>You are correct: you should add </span><dllmap dll="assemblygen-native" target="libassemblygen-native.dylib" /><span> to assemblygen/src/app.config. Also, do the same for each assemblygen/assemblies/qyoto-<QtModule>/CMakeLists.txt (there is an <dllmap dll=\"qyoto-qtcore-native\" target=\"libqyoto-qtcore-native.so.2\"/>, just change ".so.2" to ".dylib").</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new
 york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span>I was going to send patches but these lines at the link you posted:</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent;
 font-style: normal;"> Instead, just use the library name itself, without any prefixes or 
suffixes, and rely on the runtime to find the appropriate library at 
runtime. For example: 

</div><pre class="csharp" style="font-family:monospace;"> <span style="color: #008000;">[</span>DllImport <span style="color: #008000;">(</span><span style="color: #666666;">"MyLibrary"</span><span style="color: #008000;">)</span><span style="color: #008000;">]</span>
 <span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #0600FF; font-weight: bold;">extern</span> <span style="color: #6666cc; font-weight: bold;">void</span> Frobnicate <span style="color: #008000;">(</span><span style="color: #008000;">)</span><span style="color: #008000;">;</span></pre>
<div>Then, you just need to provide <tt>MyLibrary.dll</tt> for Windows platforms, <tt>libMyLibrary.so</tt> for Unix platforms, and <tt>libMyLibrary.dylib</tt> for Mac OS X platforms <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">suggest that no DLL maps are needed because if the names do not contain dots (and in our case they don't) the "lib" prefix and the
 ".dylib" suffix are automatically resolved. So I'd like to dig further into the issue and make this work with no maps if possible.<br></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;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Vivek Gani <vivekgani@gmail.com><br> <b><span style="font-weight: bold;">To:</span></b> kde-bindings@kde.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, September 9, 2012 12:05 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono<br> </font> </div> <br>
Hey all, <br><br>I'm currently having some issues which I think I'm close to fixing, but was wondering if anyone has already encountered it before:<br><br>The Issue:<br><br>I can successfully compile smokegen & smokeqt (using homebrew), but when i make assemblygen it seems setup to expect a .dll. <br><br>[ 1%] Built target assemblygen<br>[ 2%] Building CXX object src/CMakeFiles/assemblygen-native.dir/assemblygen-native.cpp.o<br>Linking CXX shared library ../bin/libassemblygen-native.dylib<br>[ 2%] Built target assemblygen-native<br>[ 4%] Built target QyotoGenerator<br>[ 5%] Building CXX object src/plugins/qyoto/CMakeFiles/qyotogenerator-native.dir/qyotogenerator-native.cpp.o<br>/Users/xxxx/projects/qyotoTest/assemblygen/src/plugins/qyoto/qyotogenerator-native.cpp:33:16: warning: <br>initialization of pointer of type 'const QMetaObject *' to null from a constant<br>boolean expression [-Wbool-conversions]<br>return
 false;<br>^~~~~<br>/Users/xxxx/projects/qyotoTest/assemblygen/src/plugins/qyoto/qyotogenerator-native.cpp:37:16: warning: <br>initialization of pointer of type 'const QMetaObject *' to null from a constant<br>boolean expression [-Wbool-conversions]<br>return false;<br>^~~~~<br>2 warnings generated.<br>Linking CXX shared library ../../../bin/libqyotogenerator-native.dylib<br>[ 5%] Built target qyotogenerator-native<br>[ 7%] Generating ../../bin/qyoto-qtcore.dll<br>Unhandled Exception: System.DllNotFoundException: assemblygen-native<br>at (wrapper managed-to-native) MainClass:InitSmoke (string)<br>at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 <br>[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: assemblygen-native<br>at (wrapper managed-to-native) MainClass:InitSmoke (string)<br>at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 <br>make[2]: *** [bin/qyoto-qtcore.dll] Error
 1<br>make[1]: *** [assemblies/qyoto-qtcore/CMakeFiles/qyoto-qtcore.dir/all] Error 2<br>make: *** [all] Error 2<br><br><br><br><br><br><br>after staring at http://www.mono-project.com/Interop_with_Native_Libraries , I realize I need something along the lines of<br><br><configuration> <dllmap dll="assemblygen-native" target="libassemblygen-native.dylib" /> </configuration><br><br>in a cmakelist file. Any tips on how to write this in? <br><br><br>my setup so far:<br><br>install qt 8.4.2<br>$ brew install qt<br><br>compile mono using homebrew (using the adamv/alt keg). <br>$ brew install mono<br><br>compile smokegen for 64-bit:<br>$ cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=amd64" .<br>$ make install<br><br>compile smokeqt:<br>$ cmake -DSmoke_DIR="$PWD/../smokegen/cmake" .<br>$ make install<br><br>Try to compile qyoto for 64-bit<br>$ cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=x86_64" .<br>$ make install<br><br><br>NOTE: it seems like others
 have had this issue before too - check out <br><br>--<br>Vivek Gani<br><br>_______________________________________________<br>Kde-bindings mailing list<br><a ymailto="mailto:Kde-bindings@kde.org" href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br><a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br><br><br> </div> </div>  </div></body></html>