soshial / xdxf_makedict

XDXF — an open and free dictionary format, that stores word articles in a structural and semantic way. The most convertible format
227 stars 52 forks source link

Compile error with glib-2.40.0: variable or field ‘g_log’ declared void #20

Closed erosennin closed 8 years ago

erosennin commented 10 years ago

glib has its own g_log() macro since version 2.40.0 which conflicts with g_log() in log.hpp:

[  3%] Building CXX object CMakeFiles/makedict.dir/src/makedict.cpp.o
In file included from /tmp/xdxf_makedict/src/parser.hpp:37:0,
                 from /tmp/xdxf_makedict/src/connector.hpp:4,
                 from /tmp/xdxf_makedict/src/makedict.cpp:37:
/tmp/xdxf_makedict/src/log.hpp:22:13: error: variable or field ‘g_log’ declared void
/tmp/xdxf_makedict/src/log.hpp:22:13: error: expected primary-expression before ‘const’
/tmp/xdxf_makedict/src/log.hpp:22:13: error: expected primary-expression before ‘...’ token
make[2]: *** [CMakeFiles/makedict.dir/src/makedict.cpp.o] Error 1
make[1]: *** [CMakeFiles/makedict.dir/all] Error 2
make: *** [all] Error 2

Removing g_log() from log.hpp and log.cpp fixed the erorr for me.

ponychicken commented 10 years ago

You probably mean removing g_info()

ortylp commented 9 years ago

@erosennin I do confirm the same problem (and workaround) under Ubuntu 14.10.

melissaboiko commented 8 years ago

Same problem here, lidar's patch works.

soshial commented 8 years ago

I merged the branches. Problem fixed.