[Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono

Dimitar Dobrev dpldobrev at yahoo.com
Sat Sep 8 23:20:53 UTC 2012


Hi,

You are correct: you should add <dllmap dll="assemblygen-native" target="libassemblygen-native.dylib" />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").

I was going to send patches but these lines at the link you posted:



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: 
[DllImport ("MyLibrary")] private static extern void Frobnicate ();
Then, you just need to provide MyLibrary.dll for Windows platforms, libMyLibrary.so for Unix platforms, and libMyLibrary.dylib for Mac OS X platforms 




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.



________________________________
 From: Vivek Gani <vivekgani at gmail.com>
To: kde-bindings at kde.org 
Sent: Sunday, September 9, 2012 12:05 AM
Subject: [Kde-bindings] Issues Building Qyoto (assemblygen) on Mac OSX Lion & 64-bit mono
 
Hey all, 

I'm currently having some issues which I think I'm close to fixing, but was wondering if anyone has already encountered it before:

The Issue:

I can successfully compile smokegen & smokeqt (using homebrew), but when i make assemblygen it seems setup to expect a .dll. 

[ 1%] Built target assemblygen
[ 2%] Building CXX object src/CMakeFiles/assemblygen-native.dir/assemblygen-native.cpp.o
Linking CXX shared library ../bin/libassemblygen-native.dylib
[ 2%] Built target assemblygen-native
[ 4%] Built target QyotoGenerator
[ 5%] Building CXX object src/plugins/qyoto/CMakeFiles/qyotogenerator-native.dir/qyotogenerator-native.cpp.o
/Users/xxxx/projects/qyotoTest/assemblygen/src/plugins/qyoto/qyotogenerator-native.cpp:33:16: warning: 
initialization of pointer of type 'const QMetaObject *' to null from a constant
boolean expression [-Wbool-conversions]
return false;
^~~~~
/Users/xxxx/projects/qyotoTest/assemblygen/src/plugins/qyoto/qyotogenerator-native.cpp:37:16: warning: 
initialization of pointer of type 'const QMetaObject *' to null from a constant
boolean expression [-Wbool-conversions]
return false;
^~~~~
2 warnings generated.
Linking CXX shared library ../../../bin/libqyotogenerator-native.dylib
[ 5%] Built target qyotogenerator-native
[ 7%] Generating ../../bin/qyoto-qtcore.dll
Unhandled Exception: System.DllNotFoundException: assemblygen-native
at (wrapper managed-to-native) MainClass:InitSmoke (string)
at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: assemblygen-native
at (wrapper managed-to-native) MainClass:InitSmoke (string)
at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0 
make[2]: *** [bin/qyoto-qtcore.dll] Error 1
make[1]: *** [assemblies/qyoto-qtcore/CMakeFiles/qyoto-qtcore.dir/all] Error 2
make: *** [all] Error 2






after staring at http://www.mono-project.com/Interop_with_Native_Libraries , I realize I need something along the lines of

<configuration> <dllmap dll="assemblygen-native" target="libassemblygen-native.dylib" /> </configuration>

in a cmakelist file. Any tips on how to write this in? 


my setup so far:

install qt 8.4.2
$ brew install qt

compile mono using homebrew (using the adamv/alt keg). 
$ brew install mono

compile smokegen for 64-bit:
$ cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=amd64" .
$ make install

compile smokeqt:
$ cmake -DSmoke_DIR="$PWD/../smokegen/cmake" .
$ make install

Try to compile qyoto for 64-bit
$ cmake -D "CMAKE_OSX_ARCHITECTURES:STRING=x86_64" .
$ make install


NOTE: it seems like others have had this issue before too - check out 

--
Vivek Gani

_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20120908/88e3b8ca/attachment-0001.html>


More information about the Kde-bindings mailing list