Hi there,
I'm trying to create a MQTT client basing on libmosquitto.
On my debian it builds an runs very well.
Now I try to make it run on openWRT.
I'm not able to build the application for the target.
It's very frustrating and I don't have any ideas.
Maybe I'm too blind to see.
Here are my ENV settings:
export STAGING_DIR=/"home/user/Source/git/sks/openWRT/openwrt/staging_dir"
export TOOLCHAIN_DIR="$STAGING_DIR/toolchain-mips_24kc_gcc-7.5.0_musl"
export TARGET_DIR="$STAGING_DIR/target-mips_24kc_musl"
export LDCFLAGS="-L$TARGET_DIR/usr/lib"
export LDFLAGS="-L$TARGET_DIR/usr/lib"
export LD_LIBRARY_PATH="$TARGET_DIR/usr/lib"
export PATH="$STAGING_DIR/bin:$PATH"
export CPATH="$TARGET_DIR/usr/include"
export CFLAGS="-I$TARGET_DIR/usr/include"
export LIBRARY_PATH="$TARGET_DIR/usr/lib"
The gcc directive is:
mips-openwrt-linux-musl-gcc-7.5.0 -o mqtt-client main.c client.c Application.c SignalHandling.c -lmosquitto
The output is:
/home/user/Source/git/sks/openWRT/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.5.0_musl/lib/gcc/mips-openwrt-linux-musl/7.5.0/../../../../mips-openwrt-linux-musl/bin/ld: cannot find -lmosquitto
collect2: error: ld returned 1 exit status
This is the mosquitto content of $TARGET_DIR/usr/lib:
So I think that
-lmosquitto should be availiable.
I'm trying for days now and I don't have any ideas anymore.
Is there somebody out there who can give some inspiration?
thanks in advance.....
