10 years, 1 month ago.

When trying to compile simple blinking program I get "cannot find -lmbed"

This is probably something very simple but all my searches did not find any help. Is there something I am missing?

EDIT- I forgot to mention I am exporting the basic blinky project to the Code Red offline compiler. I have had past exports work but for some reason recently it started doing this. I have a feeling something has changed fairly recently.

Red Suite(NXP Edition) v4.1.5


Question relating to:

4 Answers

10 years ago.

The problem is that the file is missing from the export, and seems to have been missing since release 44 of the mbed library. Travis, if you remove the mbed library from your project, and then import version 43 of the mbed library, then build and export your project, you should find that this problem is fixed. Doing that fixed the problem for me.

best regards, steve

Accepted Answer

Thanks again for the help. Here is the link to your similar questsion http://mbed.org/questions/221/Is-there-a-bug-in-the-export-to-external/

I hesitate to say this is answered since I want the mbed developers to fix this problem.

posted by Travis Travelstead 06 Jan 2013
10 years, 1 month ago.

Maybe you somehow deleted the mbed lib from your project or it is in the wrong directory.

I will say anything is possible but I exported the project and imported it without any other modifications and it appears to show up in Code Red.

posted by Travis Travelstead 02 Jan 2013

I just exported a project myself and am having this same link error. In my project archive there is no libmbed.a file:

% find . -name '*.a' ./mbed/LPC1768/GCC_CR/libcapi.a ./mbed/LPC1768/GCC_CR/libcpp.a

This is a project that builds fine in mbed online compiler, but when I export to lpcxpresso code red and build the project there I get this error. Looks like the export isn't correct?

thanks steve

posted by Steve Ravet 04 Jan 2013
10 years, 1 month ago.

Are you using the mbed online compiler or an offline compiler? I get the same error when trying to use LPCxpresso offline compiler (I think it is something to do with the linking stage )with an mbed project - not solved it yet though.

I am using the offline compiler. The other odd thing is I had an earlier project work months ago but I believe it has something to do with changes the made fairly recently to the export process.

posted by Travis Travelstead 02 Jan 2013
10 years ago.

Hi Travis, unfortunately, there were a couple of hard-coded library names in the project templates and the library temporarily changed name. Both issues have been addressed.

You can use now the new exporter enabling beta mode here: http://mbed.org/betamode/

The fix should appear live around Monday next week.

Cheers, Emilio