kvic-z / brcm-arm-toolchains

26 stars 15 forks source link

How to add library search paths #1

Closed alephnull closed 6 years ago

alephnull commented 6 years ago

To give you some context, I am trying to use this toolchain to simply build some standalone applications and not the whole asus-merlin image.

When trying to build, I see the same error that shibby20 reported. I confess that your suggestion to make a link did not make sense to me.

I tried to link by adding a -L directive but it looks that this is ignored. I was able to proceed by setting LD_LIBRARAY_PATH and that worked.

I may be asking a rather n00b question, but a pointer in the right direction would be appreciated. Thanks.

kvic-z commented 6 years ago

I can't recall why I had to make the symlink in snbforum's post #12 that you linked above. Very likely it was due to hardcoded path reference in ASUSWRT or Merlin's project. Then frankly I also can't recall or justify now why I made that suggestion to Shibby20 two years ago.

I used this toolchain to build Merlin firmware, and also an independent project, pixelserv-tls. You may look at the Makefile-XC and check LDFLAGS/SHAREDLIB/STATICLIB for linking to external libraries.