Qt Creator can't compile header file (just 1 function)
opened this issue · comments
Hello developers,
I've cloned from this commit: 7b62ace
Then I included both binn.c
and binn.h
files into my Qt project. Unfortunately only one single function is preventing Qt from compiling my project. It's at line 262
:
.../binn.h:262: error: expected ‘,’ or ‘...’ before ‘(’ token
void APIENTRY binn_set_alloc_functions(void* (*new_malloc)(size_t), void* (*new_realloc)(void*,size_t), void (*new_free)(void*));
^
I don't need that function, so commenting it out will compile successfully.
I have a note that I'm new to both C and C++.
May I ask if you could give me some hint to solve this issue?
Thank you,
Hi!
I don't know the reason why it is not working with Qt. Maybe because it is a C++ compiler???
It compiles well with C compilers.
For now you can just comment the function declaration if you will not use it.
Thank you. I commented that function out and could build my project successfully. I think the problem might be the C++ compiler. Luckily only that function is the problem.
Thanks again for your help.