User forums > Using Code::Blocks

Code::Blocks compiles in 64 bit Linux!!

(1/3) > >>

Promit:
Just got it going today! Had to make one minor change, but it's really up and running. So I finally have a decent IDE for my 64 bit Gentoo system.

Getting it to work is actually fairly simple. There's a line in Makefile.unix like so:
PROJECT_CFLAGS= -Wall -g `wx-config --cflags`
To get it to compile properly on the Athlon64, it must read:
PROJECT_CFLAGS= -fPIC Wall -g `wx-config --cflags`

I'm not entirely sure why -fPIC is required on the A64 and not on regular x86; some kind of architectural change I guess. Quick research suggests that -fPIC is safe to add even in 32 bit compiles, where at worst it will have no effect.

I've only done some very cursory testing, but everything seems fine with just one exception. Loading the code completion plugin causes the IDE to crash upon closing. I did notice some int/pointer hackery warnings during the compile, but I fixed the code to work on 64 bit (as far as I could tell) and it has not prevented the crash. I'm still poking around the codecompletion source to see if anything obvious shows up.

Mandrav: You were using wxCommandEvent::SetInt in several places to pass a Parser*. This is naturally no longer allowed, since int remains 4 bytes while Parser* is 8. I modified the code to always use wxCommandEvent::SetExtraLong instead of SetInt, but that didn't actually prevent the crash, even after modifying ALL of the SetInt calls rather than just the ones that used SetInt to transfer a pointer. I'm looking around the source, but if you have any insight as to where the problem might be, that'd be greatly appreciated.

Promit:
In retrospect this post was probably better off in development. Ah well.

Promit:
Oh, and I should've probably registered before posting too  :lol:

Promit:
Ok, well it looks like I've fixed the shutdown crash finally. A size_t was being passed as an int to a printf. But when I go to Settings->Configure Plugins->Code Completion, the IDE just freezes. Still investigating why; this doesn't appear to affect any other plugin.

[EDIT] Actually invoking code completion also freezes.

mandrav:

--- Quote ---Just got it going today! Had to make one minor change, but it's really up and running. So I finally have a decent IDE for my 64 bit Gentoo system.
--- End quote ---

That's amazing!


--- Quote ---Mandrav: You were using wxCommandEvent::SetInt in several places to pass a Parser*. This is naturally no longer allowed, since int remains 4 bytes while Parser* is 8
--- End quote ---

You 're right. It was a quick-hack to pass around the Parser* while developing and it got left in there. What's worse, I forgot about it...
Thanks for reminding me :)


--- Quote ---Actually invoking code completion also freezes
--- End quote ---

I 've noticed it too, lately. The code completion plugin was always a little shakey under linux but never freezed the app (it might have crashed it sometimes, but no freezes). There have been some changes in the parser threading lately. I 'm not sure that's what's caused it, but I 'll investigate some more.

I hope you 'll send us a patch with the changes you made ;)

Yiannis.

Navigation

[0] Message Index

[#] Next page

Go to full version