Author Topic: build CodeBlock.cbp meet "strdup" error  (Read 11984 times)

Offline hou

  • Single posting newcomer
  • *
  • Posts: 8
build CodeBlock.cbp meet "strdup" error
« 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: build CodeBlock.cbp meet "strdup" error
« Reply #1 on: June 25, 2008, 12:51:53 pm »
A little more information might help.

Which manual ?
Which OS ?
Which version of wxWidgets ?

Offline hou

  • Single posting newcomer
  • *
  • Posts: 8
Re: build CodeBlock.cbp meet "strdup" error
« Reply #2 on: June 26, 2008, 04:43:51 am »
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 ===|


Offline hou

  • Single posting newcomer
  • *
  • Posts: 8
Re: build CodeBlock.cbp meet "strdup" error
« Reply #3 on: June 26, 2008, 08:46:03 am »
I set ToolChain Executable, c compiler to mingw32-gcc.exe. Then it compile finely.

Offline petsagouris

  • Single posting newcomer
  • *
  • Posts: 5
    • arhitektonas
Re: build CodeBlock.cbp meet "strdup" error
« Reply #4 on: July 28, 2008, 10:17:22 am »
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.

mjdrafting

  • Guest
Re: build CodeBlock.cbp meet "strdup" error
« Reply #5 on: May 23, 2009, 07:54:02 am »
Try

   Settings->Compiler and debugger...

Then choose the Toolchain executable tab.