Paar Problemchen :-)
-
Hallo Zusammen,
Vorweg, Nein ich bin kein Neuling oder Anfangs Programmierer
So, folgendes...
Ich setzte die Software Voodoochat (www.vochat.com) mit dem C++ Daemon ein der für Linux gedacht ist.Die Compilierung mittels gcc ist absolut kein Problem und läuft einwandfrei durch.
Jetzt sitz ich aber grad dran, dem Chat-Daemon den MSESSION Support (http://www.mohawksoft.com/devel/msession.html) Shared-Memory Session Server der mit PHP Kommuniziert und eine C/C++ Api besitzt bei zu bringen.
Mein Problem, binde Ich in die Daemon.cpp die msessionapi.h ein, setzte dafür die nötigen Includes beim Compilieren:
gcc -O3 daemon.cpp -lmysqlclient -I/usr/include/mysql -I/src/phoenix/msession -I/src/phoenix/src -L/usr/lib/mysql -lphoenix -lstdc++ -o daemon1
bringt er mir folgende Ausgabe Fehler:
In file included from /src/phoenix/msession/msessionapi.h:25, from daemon.cpp:34: /src/phoenix/src/reqclient.h:144: error: parse error before `*' token /src/phoenix/src/reqclient.h:156: error: type specifier omitted for parameter ` MSock' /src/phoenix/src/reqclient.h:156: error: parse error before `*' token /src/phoenix/src/reqclient.h:157: error: type specifier omitted for parameter ` MSock' /src/phoenix/src/reqclient.h:157: error: parse error before `*' token /src/phoenix/src/reqclient.h:158: error: type specifier omitted for parameter ` MSock' /src/phoenix/src/reqclient.h:158: error: parse error before `*' token /src/phoenix/src/reqclient.h:159: error: parse error before `*' token /src/phoenix/src/reqclient.h:160: error: type specifier omitted for parameter ` MSock' /src/phoenix/src/reqclient.h:160: error: parse error before `*' token In file included from /src/phoenix/src/Phoenix.h:183, from /src/phoenix/msession/msessionapi.h:28, from daemon.cpp:34: /src/phoenix/src/mmutex.h:53: error: `MUTEX' was not declared in this scope /src/phoenix/src/mmutex.h:53: error: `mutex' was not declared in this scope /src/phoenix/src/mmutex.h:53: error: variable or field `MutexLock' declared void /src/phoenix/src/mmutex.h:54: error: `MUTEX' was not declared in this scope /src/phoenix/src/mmutex.h:54: error: `mutex' was not declared in this scope /src/phoenix/src/mmutex.h:54: error: variable or field `MutexUnlock' declared void /src/phoenix/src/mmutex.h:56: error: `MUTEX' was not declared in this scope /src/phoenix/src/mmutex.h:56: error: `mutex' was not declared in this scope /src/phoenix/src/mmutex.h:56: error: variable or field `MutexInit' declared void /src/phoenix/src/mmutex.h:57: error: `MUTEX' was not declared in this scope /src/phoenix/src/mmutex.h:57: error: `mutex' was not declared in this scope /src/phoenix/src/mmutex.h:57: error: variable or field `MutexDestroy' declared void /src/phoenix/src/mmutex.h:58: error: `EVENT' was not declared in this scope /src/phoenix/src/mmutex.h:58: error: `event' was not declared in this scope /src/phoenix/src/mmutex.h:58: error: `MUTEX' was not declared in this scope /src/phoenix/src/mmutex.h:58: error: `mutex' was not declared in this scope /src/phoenix/src/mmutex.h:58: error: parse error before `)' token /src/phoenix/src/mmutex.h:59: error: `EVENT' was not declared in this scope /src/phoenix/src/mmutex.h:59: error: `event' was not declared in this scope /src/phoenix/src/mmutex.h:59: error: variable or field `EventInit' declared void /src/phoenix/src/mmutex.h:60: error: `EVENT' was not declared in this scope /src/phoenix/src/mmutex.h:60: error: `event' was not declared in this scope /src/phoenix/src/mmutex.h:60: error: variable or field `EventDestroy' declared void /src/phoenix/src/mmutex.h:61: error: `EVENT' was not declared in this scope /src/phoenix/src/mmutex.h:61: error: `event' was not declared in this scope /src/phoenix/src/mmutex.h:61: error: variable or field `EventSignal' declared void /src/phoenix/src/mmutex.h:68: error: 'MUTEX' is used as a type, but is not defined as a type. /src/phoenix/src/mmutex.h:69: error: 'EVENT' is used as a type, but is not defined as a type. /src/phoenix/src/mmutex.h: In member function `void MMutex::lock()': /src/phoenix/src/mmutex.h:80: error: `m_mutex' undeclared (first use this function) /src/phoenix/src/mmutex.h:80: error: (Each undeclared identifier is reported only once for each function it appears in.) /src/phoenix/src/mmutex.h:80: error: `MutexLock' cannot be used as a function /src/phoenix/src/mmutex.h: In member function `void MMutex::unlock()': /src/phoenix/src/mmutex.h:86: error: `MutexUnlock' cannot be used as a function In file included from /src/phoenix/src/Phoenix.h:201, from /src/phoenix/msession/msessionapi.h:28, from daemon.cpp:34: /src/phoenix/src/mthread.h: At global scope: /src/phoenix/src/mthread.h:77: error: ISO C++ forbids declaration of ` THREAD_RET' with no type /src/phoenix/src/mthread.h:77: error: parse error before `thunk' /src/phoenix/src/mthread.h:109: error: ISO C++ forbids declaration of ` THREAD_RET' with no type /src/phoenix/src/mthread.h:109: error: `THREAD_RET' declared as a `virtual' field /src/phoenix/src/mthread.h:109: error: declaration of `int MThread::THREAD_RET' /src/phoenix/src/mthread.h:77: error: conflicts with previous declaration `int MThread::THREAD_RET' /src/phoenix/src/mthread.h:109: error: parse error before `(' token In file included from /src/phoenix/src/Phoenix.h:202, from /src/phoenix/msession/msessionapi.h:28, from daemon.cpp:34: /src/phoenix/src/mserver.h:59: error: field `m_tmsStart' has incomplete type /src/phoenix/src/mserver.h:60: error: field `m_tmsEnd' has incomplete type /src/phoenix/src/mserver.h: In member function `clock_t MServerThreadCore::Ticks(int)': /src/phoenix/src/mserver.h:75: error: aggregate `tms tmsT' has incomplete type and cannot be defined /src/phoenix/src/mserver.h:76: error: `times' undeclared (first use this function) In file included from /src/phoenix/src/Phoenix.h:219, from /src/phoenix/msession/msessionapi.h:28, from daemon.cpp:34: /src/phoenix/src/mplugin.h:69:2: #error No plugin defined In file included from /src/phoenix/src/Phoenix.h:219, from /src/phoenix/msession/msessionapi.h:28, from daemon.cpp:34: /src/phoenix/src/mplugin.h: At global scope: /src/phoenix/src/mplugin.h:82: error: 'HDLL' is used as a type, but is not defined as a type.
Was wollen mir diese Fehler sagen?
Bzw Was mach ich bei der einbindung falsch?Danke für eure Hilfe!!
Banshee
-
Hallo,
vielleicht mal g++ statt gcc probieren?!
-
Jeap hab ich schon probiert.. gleiche Fehlermeldungen!
-
Kenn mich mit deiner Library nicht aus, aber schau mal nach einer anderen (neueren oder gepatchten) Version. Eventuell hast du auch eine Version für den falschen Compiler runtergeladen, die großgeschriebenen Typnamen (z.B. MUTEX)sind unter Windows recht häufig.
Im übrigen ist g++ fast das gleiche wie gcc, der einzige Unterschied besteht darin, dass g++ auch die Standardbibliothek von C++ dazulinkt. Der Compiler merkt an der Dateiendung, welche Programmiersprache du verwendest
-
Die /src/phoenix/src/reqclient.h wäre nicht schlecht. Zumindest die Zeilen des ersten Fehlers.