User forums > Help

CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?

<< < (4/5) > >>

er:
And if I revert to the default compiler, GCC4.2, rather than the ported GCC4.4, and a check the i386 compiler flag, I get,

"error : CPU you selected does not support x86-64 instruction set",

which seems consistent with the error I get under GCC4.4...

stahta01:

--- Quote from: er on November 12, 2010, 08:19:41 pm ---Update : there is no problem in building the same program from the command line, .e.g

/sw/bin/g++-4 -o helloworld main.cpp

and it executes as it should...

--- End quote ---

And if you looked at the Full Compiler log you would be able to say something is different.

Tim S.

er:
Thanks.

As I've mentioned, I have set Compiler logging to Full Command Line. I guess this is what you meant?

In the Build log, this is what I get:


-------------- Build: Debug in cpp_0x ---------------

g++  -o bin/Debug/cpp_0x obj/Debug/main.o   
ld: warning: in obj/Debug/main.o, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 1 warnings

er:
And this is what the staff from Fink tells me :

"You're on a 32-bit Fink  (according to the link, unless you changed
something) and for some reason the CodeBlocks IDE appears to be linking
64-bit stuff as well, and the two don't mix.

We see similar errors when packages try to build as 64-bit by default
and try to link 32-bit libraries.  This normally happens because the
Xcode compilers default to 64-bit mode.

gcc4.4 hasn't changed since your prior message, and we haven't had any
other reports of altered behavior.  I'm inclined to think that something
has changed in Codeblocks.  Is this the _same_ version that used to work
for you?"

I think I'm using the same version of CB, though.

stahta01:
You need to do a re-build so the compiler command is seen in the build log!

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version