openlierox
openlierox copied to clipboard
error: expected primary-expression before ‘struct’
Hello again,
I try compilation openlierox 0.58_rc3 and :
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
SYSTEM_DATA_DIR = /usr/share/games
DEBUG = ON
DEDICATED_ONLY = OFF
G15 = OFF
X11 = ON
HAWKNL_BUILTIN = ON
LIBZIP_BUILTIN = OFF
STLPORT = OFF
GCOREDUMPER = OFF
BREAKPAD = Off
CMAKE_C_COMPILER = /usr/bin/cc
CMAKE_C_FLAGS = -O2 -fPIC
CMAKE_CXX_COMPILER = /usr/bin/c++
CMAKE_CXX_FLAGS = -O2 -fPIC
OLX_VERSION = 0.58_rc3
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/SBo/openlierox-0.58_rc3/build
Scanning dependencies of target openlierox
[ 0%] Building CXX object CMakeFiles/openlierox.dir/src/main.o
In file included from /tmp/SBo/openlierox-0.58_rc3/./include/FileDownload.h:30:0,
from /tmp/SBo/openlierox-0.58_rc3/./include/CClient.h:31,
from /tmp/SBo/openlierox-0.58_rc3/src/main.cpp:20:
/tmp/SBo/openlierox-0.58_rc3/./include/HTTP.h:24:24: fatal error: curl/types.h: No such file or directory
#include <curl/types.h>
^
compilation terminated.
make[2]: *** [CMakeFiles/openlierox.dir/src/main.o] Error 1
make[1]: *** [CMakeFiles/openlierox.dir/all] Error 2
make: *** [all] Error 2
This error fixed after change the curl header curl/types.h ---> curl/typecheck-gcc.h in HTTP.h file. but I also the same error in file HTTP.cpp not corrected in the same way. compilation crash at 68% :
curl_easy_setopt(curl, CURLOPT_HTTPPOST, curlForm);
^
/tmp/SBo/openlierox-0.58_rc3/src/common/HTTP.cpp:277:2: error: expected primary-expression before ‘__typeof__’
curl_easy_setopt(curl, CURLOPT_HTTPPOST, curlForm);
^
/tmp/SBo/openlierox-0.58_rc3/src/common/HTTP.cpp:277:2: error: expected primary-expression before ‘const’
curl_easy_setopt(curl, CURLOPT_HTTPPOST, curlForm);
^
/tmp/SBo/openlierox-0.58_rc3/src/common/HTTP.cpp:277:2: error: expected primary-expression before ‘__typeof__’
curl_easy_setopt(curl, CURLOPT_HTTPPOST, curlForm);
^
/tmp/SBo/openlierox-0.58_rc3/src/common/HTTP.cpp:277:2: error: expected primary-expression before ‘char’
...
make[2]: *** [CMakeFiles/openlierox.dir/src/common/HTTP.o] Error 1
make[1]: *** [CMakeFiles/openlierox.dir/all] Error 2
make: *** [all] Error 2
openlierox-0.58_rc3/include/HTTP.h curl/types.h ----> curl/typecheck-gcc.h
openlierox-0.58_rc3/src/common/HTTP.cpp curl/types.h ----> curl/typecheck-gcc.h
Hm, that is GCC 4.8.2? What is your Curl version? Do I understand you correctly that after you changed those two include files, it works?
That is of course not the correct solution for us because we need a solution which works everywhere. Someone should check the Curl docs about the correct include. Also someone should check out why curl/types.h
fails. It might be easy to work around that.
Apparently the header was removed from new CURL versions and will not be reinstated: http://sourceforge.net/p/curl/bugs/1020/
The bug discussion mentions that "the header was blanked out almost 7 years ago". Shouldn't just removing the include work?
ooopss Works !!! Thanks again !!!
SOLVED
This should be fixed first.