[Qgis-developer] Building ".so" plugin, not ".dylib" on Mac
Tasos Varoudis
null at archtech.gr
Tue Oct 30 07:51:37 PDT 2012
Im not doing both together:
one in "-=" and the bundle is "+="
This is what I get
g++-4.2 -headerpad_max_install_names -FXXX/lib -arch x86_64 -single_module -bundle -Xarch_x86_64 -mmacosx-version-min=10.6 -o libTest.dylib debug/XX.o ….
file libTest.dylib
libTest.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Im not sure if Im don't something else wrong. On linux everything work perfect.
Where should I put a dylib file in order to load it as a QGIS plugin on a Mac OSX?
Best
On 30 Oct 2012, at 14:40, William Kyngesburye <woklist at kyngchaos.com> wrote:
> If you are doing both of those at the same time, I'm guessing that dynamiclib (probably synonym for dylib) is overriding bundle.
>
> You can figure out what it really linked as with:
>
> file /path/to/your/plugin
>
> But then, the difference between a dylib and a bundle is not a big one - a dylib can be loaded like a bundle. Maybe there is a different problem?
>
> On Oct 30, 2012, at 9:22 AM, Tasos Varoudis wrote:
>
>> Hi,
>>
>> So something like that should work:
>>
>> macx:QMAKE_LFLAGS_PLUGIN -= -dynamiclib
>> macx:QMAKE_LFLAGS_PLUGIN += -bundle
>>
>> But it didn't.
>> I still get a dylib file and if I rename it to .so QGIS will crash (as it really a dylid and qgis is confused) or not load at all (if I leave it as dylib and move it to the plugin folder).
>>
>> Thanks
>> Tasos
>>
>>
>> On 30 Oct 2012, at 13:46, William Kyngesburye <woklist at kyngchaos.com> wrote:
>>
>>> You need to use a MODULE type for the cmake ADD_LIBRARY(). I don't know how to do this with qmake, but the linker flag is -bundle instead of -dylib.
>>>
>>> On Oct 30, 2012, at 4:54 AM, Tasos Varoudis wrote:
>>>
>>>> Hi all,
>>>>
>>>> Im using qmake to build a C++ plug.
>>>>
>>>> On mac I get a .dylib and I can't load it in the same way as in other OSs.
>>>>
>>>> Im not sure, but I think has something to do this the dylib, as the cmake official build is producing .so files for the plugs.
>>>>
>>>> Even though I search I can't make qmake produce a .so lib on mac.
>>>>
>>>> Any ideas? help?
>>>>
>>>> Best,
>>>> Tasos
>>>>
>>>> _______________________________________________
>>>> Qgis-developer mailing list
>>>> Qgis-developer at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>> -----
>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>> http://www.kyngchaos.com/
>>>
>>> "Those people who most want to rule people are, ipso-facto, those least suited to do it."
>>>
>>> - A rule of the universe, from the HitchHiker's Guide to the Galaxy
>>>
>>>
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> The equator is so long, it could encircle the earth completely once.
>
More information about the Qgis-developer
mailing list