AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Keine Forms in CLX-DLLs? Workaround?

Ein Thema von Colonel Chris · begonnen am 25. Nov 2003 · letzter Beitrag vom 25. Nov 2003
Antwort Antwort
Colonel Chris

Registriert seit: 27. Okt 2003
7 Beiträge
 
#1

Keine Forms in CLX-DLLs? Workaround?

  Alt 25. Nov 2003, 22:41
Ich versuche, CLX-Forms in DLLs/SOs abzuspeichern. Leider bekomme ich vom Debugger stets die Fehlermeldung
"Fatal: cannot create application object in shared objects or libraries"
in dem Moment, in dem die DLL (dynamisch) von der Trägerapplikation geladen wird.

Das Problem scheinen die Forms zu sein. Sobald ich Form-Klassen erzeuge, ist die DLL nicht mehr benutzbar. Hat jemand ne Idee, woran das liegen könnte? In der Delphi-Hilfe gibts vage Andeutungen, dass CLX evtl. nur mit Packages funktioniert - ich hoffe nicht!
  Mit Zitat antworten Zitat
jbg

Registriert seit: 12. Jun 2002
3.481 Beiträge
 
Delphi 10.1 Berlin Professional
 
#2

Re: Keine Forms in CLX-DLLs? Workaround?

  Alt 25. Nov 2003, 22:58
Zitat von Colonel Chris:
"Fatal: cannot create application object in shared objects or libraries"
QForms.pas sagt dazu:
Zitat:
Restrictions on CLX and TApplication in external modules:
CLX and Qt allow only a single instance of the application object - it is
created and destroyed in the initialization and finalization sections of
QControls.pas, respectively. It is the user's responsibility when using
external modules (packages and libraries or shared objects) in their
applications to ensure that only a single instance of TApplication is
created. Please heed the following rules when mixing modules that rely on
visual CLX:
- External libraries (.dll's/.so's) may not refer to visual CLX units
directly or indirectly.
- If you wish to include visual CLX code in an external library, the
external library must be a *package* to avoid duplicate unit
initialization and finalization.
- If your package uses the visualclx package, the main application must also
use it, and should not directly link in visual CLX units.
Zitat:
In der Delphi-Hilfe gibts vage Andeutungen, dass CLX evtl. nur mit Packages funktioniert - ich hoffe nicht!
Ein Package ist im Grunde nichts anderes als eine DLL, mit ein paar Erweiterungen.

Du könntest deiner Anwendung und die DLL das VisualClx Package als dependency hinzufügen. (Project/Options.../Packages)
  Mit Zitat antworten Zitat
Colonel Chris

Registriert seit: 27. Okt 2003
7 Beiträge
 
#3

Re: Keine Forms in CLX-DLLs? Workaround?

  Alt 25. Nov 2003, 23:20
Zitat von jbg:
Ein Package ist im Grunde nichts anderes als eine DLL, mit ein paar Erweiterungen.

Du könntest deiner Anwendung und die DLL das VisualClx Package als dependency hinzufügen. (Project/Options.../Packages)
Danke für die Hilfe. Aber gibt es keine andere Lösung? Ich würde schon gern eine DLL/SO machen, der Unabhängigkeit wegen.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:10 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz