Author Topic: CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?  (Read 16283 times)

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Here's the report:

http://developer.berlios.de/bugs/?func=detailbug&bug_id=17435&group_id=5358

For example, the keyboard types with the Command key. The space bar is unresponsive etc.

The older version of CB (8.05) works fine, but I need GCC 4.4, which is available under 10.05.

Any suggestion, please?



Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Here's the report:

http://developer.berlios.de/bugs/?func=detailbug&bug_id=17435&group_id=5358

For example, the keyboard types with the Command key. The space bar is unresponsive etc.

The older version of CB (8.05) works fine, but I need GCC 4.4, which is available under 10.05.

Any suggestion, please?



Use CB 8.02 if it works; and, Code::Blocks 10.05 does not.
Code::Blocks is NOT a Compiler.
Install the Compiler you want; then setup Code::Blocks to use the Compiler you want.

Note: The above works for Windows; I have no reason it won't work for OSX.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Thanks it worked.

Another problem : is it worth a bug report?. In
 open > project
Clicking on Open does not close the pop up window. Clicking on Cancel shuts it, though.

Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34

Use CB 8.02 if it works; and, Code::Blocks 10.05 does not.
Code::Blocks is NOT a Compiler.

Yes, I know CB is and IDE, but it comes with a pre-installed compiler, right?


Install the Compiler you want;


How do you install GCC4.4 on Mac OSX?


then setup Code::Blocks to use the Compiler you want.


How? I looked at Settings > Compiler and debugger. I see there's a scroll for choosing a compiler, but there are some compilers on my machine that do not show. For example, I have installed via Fink, /sw/bin/gcc-4. How do I parametrize CodeClocks to "know" of this compiler.

Thanks to the reply below, I probably will be able to go ahead with CCG 10.0, but the questions above are still of interest to me, for future reference. Thanks.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
See http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps

If the Compiler Name you want already has a Valid Path that differs from what you want.

Copy the Compiler giving it a new name and change the toolchain path to the correct path.

Tim S.
« Last Edit: August 17, 2010, 12:47:38 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
See http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps

If the Compiler Name you want already has a Valid Path that differs from what you want.

Copy the Compiler giving it a new name and change the toolchain path to the correct path.

Tim S.

Thanks. This has worked with compiler gcc4.4 that I installed with fink. Specifically, in

Settings > Compiler > Toolchain

I replaced C-compiler by by gcc-4 and the C++ compiler by g++-4. Since make, ar and gdb were left out by the fink install, rather than replace the "compiler's installation directory" with the new one, /sw/bin, I put the latter under Additional Pathname.

And yes, I was able to use C++0x with the flat -std=c++0x. Let's see if it works upon exhaustive use.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Hi,

I'm retracing my steps, above, and stumble upon this problem:

||warning: in obj/.../libs/assign/v2/src/main.o, file was built for i386 which is not the architecture being linked (x86_64)|
||=== Build finished: 0 errors, 1 warnings ===|

Any suggestion for troubleshooting? Thanks.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Hi,

I'm retracing my steps, above, and stumble upon this problem:

||warning: in obj/.../libs/assign/v2/src/main.o, file was built for i386 which is not the architecture being linked (x86_64)|
||=== Build finished: 0 errors, 1 warnings ===|

Any suggestion for troubleshooting? Thanks.


Find the Compiler or Linker Option needed to specify the machine/instruction set.
Put the right option in the project extra compiler or linker area.

Tim S.
« Last Edit: November 11, 2010, 09:31:24 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Thanks. I guess you mean this

http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html

?

In Build Options > Compiler Settings > Compiler Flags there is a flag for i386, but not x86_64...

I tried -march=core2 which seemed like a related match, but no change : the same warning.

Still stuck.

 
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?
« Reply #10 on: November 11, 2010, 09:41:45 pm »
As a comparison,

1- Under XCode/GCC4.2, I can choose the architecture betw ppc, i386 and X86_64, using a scroll down menu. I tried the last two and they compile fine.
2- I only encountered the above warning by trying to compile with GCC4.4, which was the original topic of this thread, and which had worked a while ago. Using
the default settings (GCC4.2), there is no such warning.

Thanks in advance.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?
« Reply #11 on: November 12, 2010, 12:57:02 am »
Turn ON Full Compiler Logging and find an expert on your Compiler to look at the full rebuild log.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?
« Reply #12 on: November 12, 2010, 05:19:28 am »
Thanks, but

by following the instructions in the link, under "Compiler logging" there are 3 options:

Full command line
Task description (default)
No logging

that all produce the same build message and nothing more:

warning: in obj/Debug/main.o, file was built for i386 which is not the architecture being linked (x86_64).

and I'm  tyring to compile

int main()
{
    //using namespace boost;
    return 0;

}
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?
« Reply #13 on: November 12, 2010, 05:23:26 am »
Well, this seems to be a problem that is common with porting to mac, and gcc4.4 is ported, in this case:

http://lists.macosforge.org/pipermail/macports-users/2010-May/020124.html

Will look there and update here if I find anything conclusive.

Weird though, as I'm just repeating some steps that I figured out in this thread and that had worked.
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC

Offline er

  • Multiple posting newcomer
  • *
  • Posts: 34
Re: CB 10.05 unusable under MAC OSX 10.6.4. - Workaround for GCC4.4 under 8.05?
« Reply #14 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...
Code::Blocks 10.05/ Mac OS X 10.6.4/GCC