Hi Sascha,

thanks for the fast answer.

I have several modules that load a service that provides a certain
functionality. I could have realized this with a singleton pattern but I
preferred the way described here
http://docs.mitk.org/nightly-qt4/MicroServices_EmulateSingleton.html
using a service to emulate a singleton.

Because I already need the functionality when the modules are
initialized I thought it is useful to use the autoload feature to make
sure that the service is available. And so far it was working... But it
looks like I used this feature in a way it is not supposed to. So I will
give my setup some additional thought.

Best regards,

Martin

On 21.08.2014 12:13, Sascha Zelzer wrote:
> Hi Martin,
> 
> I am not sure that I fully understood your set-up.
> 
> The auto-load mechanism is meant to load DLLs which register stuff into
> a running application (usually services). These DLLs typically are not
> linked to from other DLLs. If this would be the case, auto-loading
> wouldn't be needed because the linker dependencies would trigger loading
> of the DLL anyway. Therefore, such DLLs do not export any symbols and
> don't need to be in the search path of the dynamic linker. Depending on
> your use case, it may mean that you have to split / refactor your library.
> 
> A typically use case for MITK is the registration of object factories
> which extend the IO and mapper functionality of the application. Because
> these extensions should be available from the beginning "AUTOLOAD_WITH
> MitkCore" is used to ensure the earliest possible load time. However,
> such DLLs do not expose further API / functionality.
> 
> Hope this helps,
> 
> Sascha
> 
> On 08/21/2014 11:50 AM, Martin Klemm wrote:
>> Hello everyone,
>>
>> I was porting my project from MITK2013.12 with QT4 to MITK2014.03 with
>> Qt5. After I adapted and compiled everything it looked good until I
>> started the application. Then I received the error message that the DLL
>> file of one of my modules is missing, even it is compiling properly.
>> While checking this DLL I figured out that the DLL is not in
>> build/bin/Debug like all the other dlls but in build/MitkCore/Debug.
>> This has to do with the following line in my MITK_CREATE_MODULE:
>> AUTOLOAD_WITH MitkCore
>>
>> Since I have a second microservice which depends on the first one I
>> added to its MITK_CREATE_MODULE Macro: AUTOLOAD_WITH
>> NAME_OF_FIRST_MICROSERVICE. In this case the DLL is saved in
>> build/MitkCore/NAME_OF_FIRST_MICROSERVICE/Debug.
>>
>> I could adapt the cmake scripts in order to include these paths but is
>> it really meant to be like this? What is the reason behind this behavior?
>>
>> Best regards,
>>
>> Martin
>>
>>
> 

-- 


Martin Klemm
Hochschule Offenburg
Badstraße 24
77652 Offenburg
Tel. +49 781 / 205 - 4681

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (MingW32)

mQENBFLmUekBCACp46Wgg+gXLpnQYlGjRS0jBVWmL+9boonSl+Imp//bJ2I9XYxE
CJJvjQM9a2W8OZoFDY4gGieDqk2JigGWoEPoXrMJh7RjaRppmWkM5EufXmLiO0Yw
vsjo22PFZPCVs6TohgboQleV8Dy1BxEUjpzaesy1x+2sE/fNKm8hAYzaLsSlwy6Y
s/g9/o8PRmm5miqakUPV3o2jy4VimGliD7FNlns6P2ePwu2mLL5iR+mqF6oUwRA2
rDjtKQZSJgyaHfdi3YcOlQXnnmT0JKcguoE1B7Xs8tYRXU2vEw2ObuF+FeksH2iM
ChqNWMSmgVQNiQEYtEfz+mq4iviYuzlaBxirABEBAAG0K01hcnRpbiBLbGVtbSA8
bWFydGluLmtsZW1tQGhzLW9mZmVuYnVyZy5kZT6JAT8EEwECACkFAlLmUekCGyMF
CQlmAYAHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRC2Jqc/SGZiKevQB/96
Fjw+45qnyJng7mN5e4IUVKPz5VqLD1rnEWBd0bL5uiL3OcXk7lyaeFD1Sx3TlvDL
QXHbaBh4D13S38j75h0UJoV7ccKkP4SiObzzBpaIP0LKrgddTDBMUaLNpkIkPTol
CyYtLF9Lyrs262TABgQfU/u2K8USVZmUrMh2nR1YDI6BDhyUnXn7ZQ6gasY8F8gv
LvKghox52Wsw9cui8ATwIZoKV46X7FrhMX+G6nmJ11Cu1/i1bVUbN8bzlrjoWGnQ
TFi4M1H7z1/CSUmkCrNuHtTg1YBnP1TI0aBSBgUsJB+SbGm4B0QTZTnYA42DVPZD
YlhtoigOoUhhCgdeKXEcuQENBFLmUekBCADURioNxPq/foCkuXnSf4VbxvF0DDZ7
pO18dW55AzVvlSKWrahx71xgnP52xKn0EEuuqTZYfY3RzHimeGXqOCbEWkk6eFkt
Sg/fMH4utD6KV+ewGb1mlRUEZgiwxbQyb+dlM1j9GmTNlr5/8VcMS5lNqCqgu59P
P59ThEGwufSeLMBf4eCidltWdh9fjqZwYnz6Y8ASjJGVgf12i2P8Mpbx7QHYecHt
nnvj4x8t9yw9h1QPdfvTIFvqp0L2MDdeAdnFhMPhNHY7RtudLuQlLDIGFqPGScJQ
EKiH3Upc9HADUO4vh6mT6OzOWhLu6cwu1XCmh74sKD+UblgOG/fd7AhDABEBAAGJ
ASUEGAECAA8FAlLmUekCGwwFCQlmAYAACgkQtianP0hmYim/JggAlcwN5b/qBObo
65/GMIX4VXb+f6/U7F6tc/KOFyypWYN6aJ3StwBbkFfeEd2ZeuTmMNyG49rxBUpl
z9JcEB27YPYGGh1aJWeVDpqSV6VMTSnJC+Dlsm1eAktpWhTCgs9yeh2RY+HWfIil
XR97+TiaznySTNqVs94zX7ynBg1Tjh+tZJgU8HUXAsuWQACWrmKHVH+ggSaBePmH
5em0wBkQD+VxYlVe00lNRnJvBtP0cRys4mRDWJYJb6mlDxQ8nv8krsDT6lUeRsYU
ct8cU8YCERNyAJ+bH2y14ymer1k+vhZaHc5Fwrj9Jwbs1YVLpOZeaX66kDdkfWbR
tjzbWAp3EQ==
=6Xht
-----END PGP PUBLIC KEY BLOCK-----

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to