C-Program Eclipse Mars

Applications, development tools, FPGA, C, WEB
Post Reply
pbornmann
Posts: 6
Joined: Tue Mar 01, 2016 4:34 pm

C-Program Eclipse Mars

Post by pbornmann » Tue Jul 12, 2016 2:06 pm

I am trying to write a C-Program for RedPitaya using Eclipse (Mars.2). I installed the required toolchain, configured Eclipse and the compiler works fine so far. My problem is (I am working in OS X 10.11) that the linker does not find the required files to build the project. In detail the files libm.so.6 and libpthread.so.0 cannot be found in OS X. Does anybody have an idea how to bring those files to the system or how to link alternative files making the linker work under OS X?

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: C-Program Eclipse Mars

Post by Nils Roos » Tue Jul 12, 2016 8:48 pm

The linaro toolchain includes all required C runtime libraries for the ARM target. When you configure your project for "Cross GCC" toolchain with the right path and prefix, eclipse should be able to discover the correct settings for the linker automatically.

Now, I haven't tried that on a Mac - I don't have one - but eclipse CDT is usually very good at such things on any platform.

pbornmann
Posts: 6
Joined: Tue Mar 01, 2016 4:34 pm

Re: C-Program Eclipse Mars

Post by pbornmann » Wed Jul 13, 2016 9:59 am

Thank you for the quick response, Nils! We could configure Eclipse under windows and ubuntu successfully. Doing the same steps under OS X leads to the problem. I reinstalled eclipse (neon) after deleting the older version and did the same steps again. I also compiled the api again and end up with the same errors:

libm.so.6, needed by .../RedPitaya/api/lib/librp.so, not found (try using -rpath or -rpath-link) blink
libpthread.so.0, needed by .../RedPitaya/api/lib/librp.so, not found (try using -rpath or -rpath-link) blink

followed by some errors 'undefined reference to...'

The toolchain I have installed is arm-linux-gnueabihf 4.9-2014.05 for Mac OS X (3748) and as there is no later version I guess it is up to date.

Basically the linker does not find the required files but I have no idea if the problem is the configuration of eclipse (does not seem so at the moment), the compiled api or if I have to add those files somewhere, if that is possible?

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: C-Program Eclipse Mars

Post by Nils Roos » Wed Jul 13, 2016 9:29 pm

Since you could compile the api, your eclipse configuration should be ok.

The "universal solution" from this article seems to be promising in your situation.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 109 guests