Ich hab mal wieder ein erneutes problem.
Ich habe einen kleinen IRC client in c++ gemacht und will den nun in glbasic packen jedoch weiß ich nicht wie ich das da rein prügeln kann.
Wenn also jemand weiß wie es geht oder mir aus meinen funktionen ne DLL machen kann bitte melden :)
danke
trucidare
hier noch ein kleiner Versuch:
*Nach oben schieb*
INLINE
}
include
DECLARE_C_ALIAS(PingAnServer, "IRCDLL.dll", "Ping", (void *sock), void);
namespace __GLBASIC__ {
ENDINLINE
WHILE TRUE
SHOWSCREEN
WEND
bekomme aber diese meldung:
compiling:
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:13: error: expected constructor, destructor, or type conversion before '<' token
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:13: error: expected `,' or `;' before '<' token
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:15: error: `PingAnServer' was not declared in this scope
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:21: error: expected unqualified-id before "while"
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:21: error: expected `,' or `;' before "while"
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:25: error: expected unqualified-id before "return"
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:25: error: expected `,' or `;' before "return"
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:33: error: expected namespace-name before ';' token
C:/DOKUME~1/DIVINE~1/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:33: error: `' is not a namespace
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
*schieb*
schmeiss' die "#include " raus. Die brauchst du nicht - das ist ja der Vorteil von DLLs.
ok danke erstmal an schranzor der mir ein nettes dll tut rausgesucht hat.
ich habe nun eine dll erstellt in der ich declspec anweisungen hab:
__declspec(dllexport) void test(int a)
{
std::cout<< "Ping"<}
nun habe ich das ganze hier eingefügt
AUTOPAUSE FALSE
c = 0
INLINE
DECLARE_C(test, "irc.dll",(int), void);
if(test)
{
c +=1;
}
test(1);
ENDINLINE
WHILE TRUE
PRINT c, 0,0
SHOWSCREEN
WEND
wenn ich es nun starte stürzt mein programm ab =(
kannst du mir sagen warum gernot?