Archiv verlassen und diese Seite im Standarddesign anzeigen : Prob DLL und klassen
//in der dll wird eine function a deklariert
#include <string>
using std::string
void a (string b);
// im prog geb ich volgendes ein
a ("test");
und dann stuertzt das prog ab, und ich verstehe nicht warum das nicht funktionieren soll!!
Mhm, ich habe weder mit string, noch mit DLLs gearbeitet, aber generell gesehen, könnte es vielleicht sein, daß er einen char * wie du ihn übergibst, einfach nicht in den Typ string konvertieren kann ?
ich schiebs mal hoch
-------------------------
vielleicht weiss es jetzt wer
Netter Troll
21.05.2002, 17:34
Kannst du mir mal das Test-Projekt per Mail senden? Würde mal gerne nachgucken!
Trollsuppe@mail.com
ciao :D
@Netter Troll
builder oder vc++
Netter Troll
22.05.2002, 00:18
Geht beides, aber ich bevorzuge VC++ ;)
Ich hoffe ich finde den Fehler :D
ciao, Troll
Ich hoffe ich finde den Fehler
ich schaffe es nicht mehr das problem zu generieren ;( ;( ;(
also das problem waren inplizite konvertierung von char * nach std::string; und auch die rueckgabe von strings
allegemein magt es das exportieren von klassen nicht, der scheint im umgang damit probleme zu haben
etwas cooles habe ich beim builder gefunden, wenn man die BORLNDMM.DLL verwendet dann funkts, ne beschreibung des problems legt der builder bei jeder dll als kommetar an :D :D
hier das teil da, ich wollte nur wissen warum in alles in der welt istd as so?
// Important note about DLL memory management when your DLL uses the
// static version of the RunTime Library:
//
// If your DLL exports any functions that pass String objects (or structs/
// classes containing nested Strings) as parameter or function results,
// you will need to add the library MEMMGR.LIB to both the DLL project and
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
// if any other projects which use the DLL will be performing new or delete
// operations on any non-TObject-derived classes which are exported from the
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
// EXE´s to use the BORLNDMM.DLL as their memory manager. In these cases,
// the file BORLNDMM.DLL should be deployed along with your DLL.
//
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
// ShortString parameters.
//
// If your DLL uses the dynamic version of the RTL, you do not need to
// explicitly add MEMMGR.LIB as this will be done implicitly for you
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.