Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

build tests/parser.cpp failed with undefined reference #3

Open
chinuno-usami opened this issue Aug 13, 2020 · 2 comments
Open

build tests/parser.cpp failed with undefined reference #3

chinuno-usami opened this issue Aug 13, 2020 · 2 comments

Comments

@chinuno-usami
Copy link

build libsdp-cpp.so with

make -f Makefile CONF=Release

and compile parser.cpp with

g++ -I./include -L./dist/Release/GNU-Linux tests/parser.cpp -lsdp-cpp

outputs

/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_private::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_hostport::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_glonass::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_mediaclock::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_fsrate::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_gps::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ntp::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_avb_stream_id::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_sender::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_dgts::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_version::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_EUI64::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_filter_mode::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_timestamp_refclk_attr::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_server::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_media_clksrc_attr::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_name::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_n1::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_clksrc_ext::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_local::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_mediaclock_param_name::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_source_filter_attr::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_char::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ieee1722_streamid::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_mediaclock_param_value::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_gal::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_nmbr::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_clksrc_param_value::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_n3::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_media_clktag::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_filter_spec::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_gmid::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_version_ext::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_src_list::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain_n2::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_address_types::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_clksrc_param_name::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ntp_server_addr::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_clksrc::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_dest_address::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_direct::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_mediaclock_ext::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_ptp_domain::parse(abnf::ParserContext&)'
/usr/bin/ld: ./dist/Debug/GNU-Linux/libsdp-cpp.so: undefined reference to `abnf::Rule_media_clkid::parse(abnf::ParserContext&)'
collect2: 错误:ld 返回 1
nm -D dist/Release/GNU-Linux/libsdp-cpp.so  |grep Rule_media_clkid

outputs

                 U _ZN4abnf16Rule_media_clkid5parseERNS_13ParserContextE
000000000014d9b0 T _ZN7Builder5visitEPN4abnf16Rule_media_clkidE

it seems does not contain some of implementation in .so file

@cmd00
Copy link

cmd00 commented Oct 1, 2020

The missing references refer to files that have not been compiled in. At a minimum you need to modify Makefile-Release.mk and add each of them to OBJECTFILES and to the Build Targets. By the looks of it the makefiles have not been updated for a long time.

@krsvital
Copy link

krsvital commented Nov 5, 2020

i have the same error....

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

No branches or pull requests

3 participants