09-10-2019 09:34 AM
Hi !
Could you plz help me and point what am doing wrong ?
I compiled core ydk-cpp core , ydk-ietf and, ios-xr from source.
However during attempt of building of my tiny code I have huge amount of linker failures :
/usr/bin/x86_64-linux-gnu-g++-5 -g3 -std=c++11 -pthread \
-L/usr/local/lib main.cpp output.o \
-lydk -lydk_cisco_ios_xr -lydk_ietf -lpcre -ldl
(build log in attachement)
Tiny code is:
What do I miss here ?
Thanks !
Solved! Go to Solution.
09-10-2019 10:02 AM
Hi Alezandr
I suggest you to look at CMakeLists.txt in C++ samples. Here what we have for the linker:
target_link_libraries(${sample}
${ydk_location}
${ydk_openconfig_location}
${ydk_cisco_ios_xr_location}
${ydk_cisco_ios_xe_location}
${xml2_location}
${curl_location}
${ssh_location}
${ssh_threads_location}
${pcre_location}
${xslt_location}
${pthread_location}
${dl_location}
-rdynamic
)
First, add all the missing libraries and parameters.
Second, try to move the bundle library to the front; sometimes that helps.
Regards,
Yan
09-10-2019 10:02 AM
Hi Alezandr
I suggest you to look at CMakeLists.txt in C++ samples. Here what we have for the linker:
target_link_libraries(${sample}
${ydk_location}
${ydk_openconfig_location}
${ydk_cisco_ios_xr_location}
${ydk_cisco_ios_xe_location}
${xml2_location}
${curl_location}
${ssh_location}
${ssh_threads_location}
${pcre_location}
${xslt_location}
${pthread_location}
${dl_location}
-rdynamic
)
First, add all the missing libraries and parameters.
Second, try to move the bundle library to the front; sometimes that helps.
Regards,
Yan
09-10-2019 01:28 PM
That helped, Thanks !
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide