Skip to content

Loading…

Problem to compile crunch #20

Open
Lebonhomme opened this Issue · 6 comments

3 participants

@Lebonhomme

Hello everybody, I am following the instructions of the "Building" tutorial, I have installed Emscripten and its dependencies but now I can't build crunch. I have downloaded the last version (April 2012) and the Makefile of http://code.google.com/p/crunch/issues/detail?id=1. I went to the crnlib folder and I started make. Here is the result :

julien@julien-H61M-D2H-USB3:~/lib/crunch/crnlib$ make
g++ crn_arealist.cpp -o crn_arealist.o -c
In file included from crn_core.h:90:0,
from crn_arealist.cpp:4:
crn_types.h:15:31: erreur: expected initializer before ‘uint64’
crn_types.h:16:31: erreur: expected initializer before ‘int64’
crn_types.h:24:10: erreur: ‘uint64’ does not name a type
crn_types.h:25:10: erreur: ‘uint64’ does not name a type
crn_types.h:33:10: erreur: ‘int64’ does not name a type
crn_types.h:34:10: erreur: ‘int64’ does not name a type
In file included from crn_core.h:92:0,
from crn_arealist.cpp:4:
crn_traits.h:46:4: erreur: ‘__int64’ was not declared in this scope
crn_traits.h:46:4: erreur: patron de l'argument 1 est invalide
crn_traits.h:47:4: erreur: patron de l'argument 1 est invalide
In file included from crn_core.h:93:0,
from crn_arealist.cpp:4:
crn_mem.h: In function ‘T* crnlib::crnlib_new_array(crnlib::uint32)’:
crn_mem.h:132:7: erreur: ‘uint64’ was not declared in this scope
crn_mem.h:132:14: erreur: expected ‘;’ before ‘total’
crn_mem.h:133:11: erreur: ‘total’ was not declared in this scope
crn_mem.h:138:72: erreur: ‘total’ was not declared in this scope
In file included from crn_core.h:94:0,
from crn_arealist.cpp:4:
crn_math.h: At global scope:
crn_math.h:60:33: erreur: ‘crnlib::math::is_power_of_2’ declared as an ‘inline’ variable
crn_math.h:60:33: erreur: ‘bool crnlib::math::is_power_of_2’ redeclared as different kind of symbol
crn_math.h:59:19: erreur: previous declaration of ‘bool crnlib::math::is_power_of_2(crnlib::uint32)’
crn_math.h:60:33: erreur: ‘uint64’ was not declared in this scope
crn_math.h:95:14: erreur: ‘uint64’ does not name a type
crn_math.h:206:14: erreur: ‘uint64’ does not name a type
In file included from crn_core.h:95:0,
from crn_arealist.cpp:4:
crn_utils.h:134:29: erreur: ‘crnlib::utils::write_val’ declared as an ‘inline’ variable
crn_utils.h:134:29: erreur: ‘bool crnlib::utils::write_val’ redeclared as different kind of symbol
crn_utils.h:133:19: erreur: previous declaration of ‘bool crnlib::utils::write_val(int, void&, crnlib::uint&, bool)’
crn_utils.h:134:29: erreur: ‘uint64’ was not declared in this scope
crn_utils.h:134:41: erreur: expected primary-expression before ‘void’
crn_utils.h:134:58: erreur: expected primary-expression before ‘&’ token
crn_utils.h:134:60: erreur: ‘buf_size’ was not declared in this scope
crn_utils.h:134:70: erreur: expected primary-expression before ‘bool’
In file included from crn_core.h:98:0,
from crn_arealist.cpp:4:
crn_win32_timer.h:7:12: erreur: ‘uint64’ does not name a type
crn_win32_timer.h:13:25: erreur: expected ‘)’ before ‘start_ticks’
crn_win32_timer.h:16:18: erreur: ‘timer_ticks’ has not been declared
crn_win32_timer.h:21:7: erreur: ‘uint64’ does not name a type
crn_win32_timer.h:24:14: erreur: ‘timer_ticks’ does not name a type
crn_win32_timer.h:25:14: erreur: ‘timer_ticks’ does not name a type
crn_win32_timer.h:26:35: erreur: ‘timer_ticks’ has not been declared
crn_win32_timer.h:29:14: erreur: ‘uint64’ does not name a type
crn_win32_timer.h:30:14: erreur: ‘uint64’ does not name a type
crn_win32_timer.h:33:7: erreur: ‘uint64’ does not name a type
crn_win32_timer.h:34:7: erreur: ‘uint64’ does not name a type
In file included from crn_core.h:101:0,
from crn_arealist.cpp:4:
crn_dynamic_wstring.h: In destructor ‘crnlib::dynamic_wstring::~dynamic_wstring()’:
crn_dynamic_wstring.h:23:35: erreur: invalid application of ‘sizeof’ to incomplete type ‘crnlib_assume_failure’
crn_dynamic_wstring.h:23:35: erreur: patron de l'argument 1 est invalide
crn_dynamic_wstring.h:23:83: erreur: invalid type in declaration before ‘;’ token
crn_arealist.cpp: In function ‘void crnlib::area_fatal_error(const char
, const char, ...)’:
crn_arealist.cpp:23:46: erreur: ‘_vsnprintf’ was not declared in this scope
make: *
* [crn_arealist.o] Erreur 1

Have you got any solution for my problem ? :)

PS : If my english is too bad just say it to me and next time I will write with my friend Google Translate :D

@kripken
Owner

That's a problem with crunch, you should file it on their project tracker, they will know much better than us.

My only guess personally would be a compiler version difference? Does it compile ok with clang or a different version of gcc?

@Lebonhomme

Well I have the latest version of gcc and I can't install an older version. How can I check with clang ? Isn't clang just able to work with one .c or .cpp file ?

@kripken
Owner

clang should be a drop-in replacement for gcc. just replace gcc with clang in the makefile. Setting $CC or $CXX might be enough.

@Lebonhomme

I am not an expert of the "make" command so I don't understand what you mean when you write "$CC or $CXX might be enough". The only thing I understood is that I had to use clang to replace gcc. I replaced :

%.o: %.cpp
g++ $< -o $@ -c

crunch.o: ../crunch/crunch.cpp
g++ $< -o $@ -c -I../inc -I../crnlib

crunch: $(OBJECTS) crunch.o
g++ $(OBJECTS) crunch.o -o crunch -lpthread

by :

%.o: %.cpp
/home/julien/lib/clang_llvm/bin/clang $< -o $@ -c

crunch.o: ../crunch/crunch.cpp
/home/julien/lib/clang_llvm/bin/clang $< -o $@ -c -I../inc -I../crnlib

crunch: $(OBJECTS) crunch.o
/home/julien/lib/clang_llvm/bin/clang $(OBJECTS) crunch.o -o crunch -lpthread

Is it what I had to do ?

I have this result :

julien@julien-H61M-D2H-USB3:~/lib/crunch/crnlib$ make
/home/julien/lib/clang_llvm/bin/clang crn_arealist.cpp -o crn_arealist.o -c
In file included from crn_arealist.cpp:4:
In file included from ./crn_core.h:90:
./crn_types.h:15:28: error: expected ';' after top level declarator
typedef unsigned __int64 uint64;
^
;
./crn_types.h:16:19: error: typedef redefinition with different types
('int' vs 'unsigned int')
typedef signed __int64 int64;
^
./crn_types.h:15:21: note: previous definition is here
typedef unsigned __int64 uint64;
^
./crn_types.h:16:26: error: expected ';' after top level declarator
typedef signed __int64 int64;
^
;
./crn_types.h:24:10: error: unknown type name 'uint64'
const uint64 UINT64_MIN = 0;
^
./crn_types.h:25:10: error: unknown type name 'uint64'
const uint64 UINT64_MAX = 0xFFFFFFFFFFFFFFFFULL; //0xFFFFFFFFFFFFFFFFui64;
^
./crn_types.h:33:10: error: unknown type name 'int64'
const int64 INT64_MIN = (int64)0x8000000000000000ULL;...
^
./crn_types.h:33:29: error: use of undeclared identifier 'int64'
...INT64_MIN = (int64)0x8000000000000000ULL; //(-9223372036854775807i64 -...
^
./crn_types.h:34:10: error: unknown type name 'int64'
const int64 INT64_MAX = (int64)0x7FFFFFFFFFFFFFFFULL; //...
^
./crn_types.h:34:29: error: use of undeclared identifier 'int64'
...INT64_MAX = (int64)0x7FFFFFFFFFFFFFFFULL; // 9223372036854775807i64;
^
In file included from crn_arealist.cpp:4:
In file included from ./crn_core.h:92:
./crn_traits.h:37:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(bool)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:37:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(bool)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:37:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(bool)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:38:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:38:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:38:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:39:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:39:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:39:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned char)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:40:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(short)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:40:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(short)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:40:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(short)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:41:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned short)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:41:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned short)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:41:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned short)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:42:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(int)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:42:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(int)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:42:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(int)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:43:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned int)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:43:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned int)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:43:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned int)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:44:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(long)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:44:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(long)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:44:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(long)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:45:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned long)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:45:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned long)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:45:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned long)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:46:4: error: redefinition of 'crnlib::scalar_type'
CRNLIB_DEFINE_BUILT_IN_TYPE(__int64)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:29:22: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
template<> struct scalar_type { \
^~~~~~~~~~~~~~
./crn_traits.h:43:4: note: previous definition is here
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned int)
^
./crn_traits.h:29:22: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
template<> struct scalar_type { \
^
./crn_traits.h:47:41: error: expected '>'
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned __int64)
^
./crn_traits.h:29:34: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
template<> struct scalar_type { \
^
./crn_traits.h:47:41: error: elaborated type refers to a typedef
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned __int64)
^
./crn_traits.h:29:34: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
template<> struct scalar_type { \
^
./crn_types.h:15:21: note: declared here
typedef unsigned __int64 uint64;
^
In file included from crn_arealist.cpp:4:
In file included from ./crn_core.h:92:
./crn_traits.h:47:4: error: cannot combine with previous '(error)' declaration
specifier
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned __int64)
^
./crn_traits.h:29:15: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
template<> struct scalar_type { \
^
./crn_traits.h:47:4: error: expected unqualified-id
CRNLIB_DEFINE_BUILT_IN_TYPE(unsigned __int64)
^
./crn_traits.h:29:35: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
template<> struct scalar_type { \
^
./crn_traits.h:48:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:48:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:48:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(float)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:49:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:49:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:49:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:50:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:34:40: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct(X* p) { p; } \
^
./crn_traits.h:50:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:54: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
./crn_traits.h:50:4: warning: expression result unused [-Wunused-value]
CRNLIB_DEFINE_BUILT_IN_TYPE(long double)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./crn_traits.h:35:57: note: expanded from macro 'CRNLIB_DEFINE_BUILT_IN_TYPE'
static inline void destruct_array(X* p, uint n) { p, n; } };
^
In file included from crn_arealist.cpp:4:
In file included from ./crn_core.h:93:
./crn_mem.h:132:7: error: use of undeclared identifier 'uint64'
uint64 total = CRNLIB_MIN_ALLOC_ALIGNMENT + sizeof(T) * num;
^
./crn_mem.h:133:11: error: use of undeclared identifier 'total'
if (total > CRNLIB_MAX_POSSIBLE_BLOCK_SIZE)
^
./crn_mem.h:138:72: error: use of undeclared identifier 'total'
uint8* q = static_cast(crnlib_malloc(static_cast(total)));
^
In file included from crn_arealist.cpp:4:
In file included from ./crn_core.h:94:
./crn_math.h:60:7: error: 'inline' can only appear on functions
inline bool is_power_of_2(uint64 x) { return x && ((x & (x - 1U))...
^
./crn_math.h:60:19: error: redefinition of 'is_power_of_2' as different kind of
symbol
inline bool is_power_of_2(uint64 x) { return x && ((x & (x - 1U))...
^
./crn_math.h:59:19: note: previous definition is here
inline bool is_power_of_2(uint32 x) { return x && ((x & (x - 1U))...
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
36 warnings and 20 errors generated.
make: *** [crn_arealist.o] Erreur 1

@kripken
Owner

Maybe they have an error in that header (crn_types.h)?

@lucasad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.