Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `edgex_device_add_device' #40

Open
Dolbae opened this issue Jul 10, 2020 · 0 comments
Open

undefined reference to `edgex_device_add_device' #40

Dolbae opened this issue Jul 10, 2020 · 0 comments

Comments

@Dolbae
Copy link

Dolbae commented Jul 10, 2020

Hello,
Installed geneva csdk on Ubuntu 20.04 and I just have tested device-bacnet-c.
But when I use ./src/build.sh, I can't complete.

  • readlink -f ./scripts/build.sh
  • dirname /home/ubuntu/work/edgeXsrc/device-bacnet-c/scripts/build.sh
  • dirname /home/ubuntu/work/edgeXsrc/device-bacnet-c/scripts
  • ROOT=/home/ubuntu/work/edgeXsrc/device-bacnet-c
  • echo /home/ubuntu/work/edgeXsrc/device-bacnet-c
    /home/ubuntu/work/edgeXsrc/device-bacnet-c
  • cd /home/ubuntu/work/edgeXsrc/device-bacnet-c
  • [ ! -f /home/ubuntu/work/edgeXsrc/device-bacnet-c/lib/ip/libbacnet.a ]
  • [ ! -f /home/ubuntu/work/edgeXsrc/device-bacnet-c/lib/mstp/libbacnet.a ]
  • mkdir -p /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-ip
  • cd /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-ip
  • cmake -DDATALINK:STRING=BACDL_BIP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /home/ubuntu/work/edgeXsrc/device-bacnet-c/src/c
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-ip
  • make
  • tee release.log
    [ 22%] Built target bacnet_objects
    [ 33%] Linking C executable device-bacnet-c
    /usr/bin/ld: CMakeFiles/device-bacnet-c.dir/main.c.o: in function bacnet_discover': main.c:(.text+0x59c): undefined reference to edgex_device_add_device'
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:162: device-bacnet-c] Error 1
    make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/device-bacnet-c.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
  • mkdir -p /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-mstp
  • cd /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-mstp
  • cmake -DDATALINK:STRING=BACDL_MSTP=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release /home/ubuntu/work/edgeXsrc/device-bacnet-c/src/c
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/ubuntu/work/edgeXsrc/device-bacnet-c/build/release/device-bacnet-mstp
    • teemake release.log

[ 22%] Built target bacnet_objects
[ 33%] Linking C executable device-bacnet-c
/usr/bin/ld: CMakeFiles/device-bacnet-c.dir/main.c.o: in function bacnet_discover': main.c:(.text+0x58c): undefined reference to edgex_device_add_device'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/device-bacnet-c.dir/build.make:162: device-bacnet-c] Error 1
make[1]: *** [CMakeFiles/Makefile2:78: CMakeFiles/device-bacnet-c.dir/all] Error 2
make: *** [Makefile:84: all] Error 2


Installed csdk-1.3.0, I can't also find on CSDK library.

$ readelf -s libcsdk.so | grep edgex_device_add
538: 0000000000034cc8 8 FUNC GLOBAL DEFAULT 11 edgex_device_add_profile
1014: 0000000000034cc8 8 FUNC GLOBAL DEFAULT 11 edgex_device_add_profile

Where is edgex_device_add_device ?

All the best,
Ryan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant