User forums > Using Code::Blocks

ambiguous overload for 'operator[]' during compilation of Code::Blocks

<< < (2/4) > >>

KirkD:
I checked the file you mentioned, and it is as you listed.  I'm not sure what is going on here, but I've had the same results on two different CentOS 5.5 x86_64 installs with wxGTK 2.8.11.  My modification seems to fix the problem, so it isn't an issue with respect to Code::Blocks at this point.  I also have a question out to the wxWidgets community - I'll post back here any response I get.  My guess is that the package was built incorrectly or there is (yet another) CentOS problem.

Thank you for your help.

-Kirk

Jenna:
There might be multiple setup.h's on your system.

If you run wx-config --cppflags in a console you should be able to see the base-path of the setup.h used as default.
It's one of the include-directories, and it's the one that starts with /usr/lib[32|64].
If you just add /wx/setup.h to it, you know which setup.h is actually used.

KirkD:
Jens,

I apologize for the slow reply - holiday weekend.

I checked wx-config --cppflags as you suggested, and you are correct.  I have two setup.h files on the system, one in /usr/lib64 one in /usr/lib.  It seems that a standard package installation brings along both 32-bit and 64-bit versions simultaneously.  The default is apparently referring to the 32-bit version and not the 64-bit version.

At this point I was able to get it built using my (hacked) modifications - I don't anticipate it will cause a problem.  But, I'll give it another try on a test machine (virtual) to see if I can reliably fix it.

Thank you for the assistance!

-Kirk

KirkD:
I've been working this a bit further and I cannot seem to force the build process to look at the correct (lib64) setup.h file.  I've tried the various settings for configure with no luck.

Regarding wx on CentOS, when I install wxBase, it comes along with both the x86_64 version and the i386 version.  If I remove the i386 version, wx-config is also removed despite the x86_64 version still being present. 

I can go in and manually change the setup.h file for the 32-bit version, but that seems a bit of a hack.

I realize that I'm splitting hairs here for "correctness", but if anyone has tips on making this behave as expected, please let me know.

-Kirk

Jenna:
If I remember correctly its is not allowed to have 32-bit libs in the lib-folder on 64-bit systems.
As far as I know, the standard only allows to use lib for native libraries (32-bit on 32-bit and 64-bit on 64-bit systems).
lib32 and lib64 are allowed for thw appropriate type of libs.
That's the cause, why C::B first looks into lib and if it does not find it's plugins, it looks into lib64.

I use wxGTK from rpmforge on centos and I have no such issues. So I think either the repo you use has a broken wxGTK version or anything other went wrong.

See also my post here: http://forums.codeblocks.org/index.php/topic,8755.msg78482.html#msg78482

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version