User forums > Help

build CodeBlock.cbp meet "strdup" error

(1/2) > >>

hou:
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.

Jenna:
A little more information might help.

Which manual ?
Which OS ?
Which version of wxWidgets ?

hou:
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 ===|

hou:
I set ToolChain Executable, c compiler to mingw32-gcc.exe. Then it compile finely.

petsagouris:

--- Quote from: hou on June 26, 2008, 08:46:03 am ---I set ToolChain Executable, c compiler to mingw32-gcc.exe. Then it compile finely.

--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

Go to full version