INLINE, Include und LIB´s

Previous topic - Next topic

trucidare

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*
Code (glbasic) Select
INLINE
}
include

DECLARE_C_ALIAS(PingAnServer, "IRCDLL.dll", "Ping", (void *sock), void);


namespace __GLBASIC__ {
ENDINLINE



WHILE TRUE
SHOWSCREEN
WEND
bekomme aber diese meldung:

Code (glbasic) Select
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
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

trucidare

MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

schmeiss' die "#include " raus. Die brauchst du nicht - das ist ja der Vorteil von DLLs.

trucidare

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:

Code (glbasic) Select
__declspec(dllexport) void test(int a)
{
std::cout<< "Ping"<}
nun habe ich das ganze hier eingefügt

Code (glbasic) Select
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?
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC