Author Topic: How to use MSPGCC in C::B  (Read 9980 times)

zach

  • Guest
How to use MSPGCC in C::B
« on: October 27, 2009, 11:54:44 pm »
Hi everyone,

I meet a problem using MSPGCC (http://mspgcc.sourceforge.net/) in C::B.
Now I have set up all the options correctly in my project.
Compiler: GNU GCC Compiler for MSP430.
Compiler flags : -Wall, -Os, -mmcu=msp430x1611
Toolchain Executables: correct directory

Project options-bulid targets:
Console application,
output filename: bin\Debug\CD.elf
 'Auto-generate prefix' checked, 'Auto-generate extension' unchecked.

It compile successfully, but when I try to build, it says that
'ld.exe||cannot find -lstdc++|
||=== Build finished: 1 errors, 0 warnings ===|'

I have read related topics here carefully about this problem but it doesn't work.
Did I miss any steps? Or I have to do something else to make it work?

Thanks!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to use MSPGCC in C::B
« Reply #1 on: October 28, 2009, 06:32:49 am »
Compiler flags : -Wall, -Os, -mmcu=msp430x1611
[...]
'ld.exe||cannot find -lstdc++|
The error arises from the linker. You are trying to link against a library (std++) that is either not available or you forgot to set the search path's for the linker correctly. Enabling the full compiler log (see my sig) might give more insight (if posted here).

What platform / compiler / OS / (C::B/OS) version are you using?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

zach

  • Guest
Re: How to use MSPGCC in C::B
« Reply #2 on: October 28, 2009, 07:29:14 am »
Thanks MortenMacFly!
I will read the documents your sig indicates.

I am using the latest C::B and MSPGCC on WinXP.