Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

trunk doesn't build?

(1/2) > >>

vri:
Or am I doing something stupid??


--- Code: ---prefix.cpp: In function ‘char* br_extract_dir(const char*)’:
prefix.cpp:396: error: invalid conversion from ‘const char*’ to ‘char*’
prefix.cpp: In function ‘char* br_extract_prefix(const char*)’:
prefix.cpp:432: error: invalid conversion from ‘const char*’ to ‘char*’
make[3]: *** [prefix.o] Error 1

--- End code ---

stahta01:
I would guess it is likely an Compiler Library Issue.
What OS?
What GCC Version?

Tim S

vri:
$ g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++ --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.4.0 20090505 (prerelease) (GCC)

OS: archlinux

indeed the compiler has been updated between my last (succesful) build and this one.

thanks for helping...

stahta01:
Blind Patch needs tested on Linux Box. Tim S


--- Code: ---Index: src/src/prefix.cpp
===================================================================
--- src/src/prefix.cpp (revision 5612)
+++ src/src/prefix.cpp (working copy)
@@ -389,7 +389,8 @@
 char *
 br_extract_dir (const char *path)
 {
- char *end, *result;
+ const char *end;
+ char *result;
 
  br_return_val_if_fail (path != (char *) NULL, (char *) NULL);
 
@@ -424,7 +425,8 @@
 char *
 br_extract_prefix (const char *path)
 {
- char *end, *tmp, *result;
+ const char *end;
+ char *tmp, *result;
 
  br_return_val_if_fail (path != (char *) NULL, (char *) NULL);
 

--- End code ---

vri:
Hmm, should have searched a bit better, because the same error has been reported already by dk in this thread:
http://forums.codeblocks.org/index.php/topic,10406.msg72109.html#msg72109. Jens couldn't reproduce it, well, it appears I can... Dk suggested a patch as well.

I applied your patch, Tim, and that resolves the compilation error. I personally have no idea at which moments this part of the code is used, but my new CB is up and running! So thanks.

Navigation

[0] Message Index

[#] Next page

Go to full version