Code::Blocks Forums
User forums => Help => Topic started by: hou on June 25, 2008, 11:44:50 am
-
When I install the CB from source following the manula's instruction;
In 4.1.7, When I build Codeblocks.cbp, I meet the error:
"strdup" is not declared in this scope in buffer.h.
I searched a lot of pages but I didn't find the solution. What is wrong? Thank you for your reply.
-
A little more information might help.
Which manual ?
Which OS ?
Which version of wxWidgets ?
-
I follow the manual downloaded from the CB website.
OS is windows.
I newly download the latest version of CB(5093), wxWidget version is 2.8.8.
When I build the CodeBlock.cbp the previous error "strdup" dispeared, but the following error appeared. How to deal with that?
E:\CB\original\codeblocks-8.02-src.tar\codeblocks-8.02-src\codeblocks-8.02\src\plugins\compilergcc\depslib\src\alloc.c||In function `ALLOC* alloc_init(int, int)':|
E:\CB\original\codeblocks-8.02-src.tar\codeblocks-8.02-src\codeblocks-8.02\src\plugins\compilergcc\depslib\src\alloc.c|27|error: invalid conversion from `void*' to `ALLOC*'|
E:\CB\original\codeblocks-8.02-src.tar\codeblocks-8.02-src\codeblocks-8.02\src\plugins\compilergcc\depslib\src\alloc.c|32|error: invalid conversion from `void*' to `char*'|
E:\CB\original\codeblocks-8.02-src.tar\codeblocks-8.02-src\codeblocks-8.02\src\plugins\compilergcc\depslib\src\alloc.c||In function `ALLOC* alloc2_init(int)':|
E:\CB\original\codeblocks-8.02-src.tar\codeblocks-8.02-src\codeblocks-8.02\src\plugins\compilergcc\depslib\src\alloc.c|57|error: invalid conversion from `void*' to `ALLOC*'|
E:\CB\original\codeblocks-8.02-src.tar\codeblocks-8.02-src\codeblocks-8.02\src\plugins\compilergcc\depslib\src\alloc.c|63|error: invalid conversion from `void*' to `char*'|
||=== Build finished: 4 errors, 0 warnings ===|
-
I set ToolChain Executable, c compiler to mingw32-gcc.exe. Then it compile finely.
-
I set ToolChain Executable, c compiler to mingw32-gcc.exe. Then it compile finely.
Exactly how can I do this?
Do I have to edit the makefile to point to mingw32-gcc.exe ?
What else do I do?
I googled for a bit couldn't find something of use. Please help because it seems that quite a few people have this problem (I got this from looking around),...
This could also go in the CodeBlocks wiki.
-
Try
Settings->Compiler and debugger...
Then choose the Toolchain executable tab.