Skip to contentSkip to conversation

TctiLdr_Initialize

tpm2 huzaifa.hashim6 at gmail.com 1 participant 2 messages Aug 29, 2021

lore
Share & tools
lore

huzaifa.hashim6 at gmail.com

#0 lore raw

I have been trying to use the TCTI for my programs and have even tried compiling the example code given in documentation but cannot seem to get it to compile.

https://www.mankier.com/3/Tss2_TctiLdr_Initialize

This page has example code for the library but it does not compile and warn against an undefined reference to the library.

Currently trying to compile a standalone file with this:
gcc testcheck.c -L=/usr/local/lib/ -ltss2-esys -ltss2-tcti-device -o testcheck

#1 lore raw

The solution is pretty simple! The documentation does not mention this but the flags needed for compiling any code that uses the header file needs the following flag:
-ltss2-tctildr

This flag will go with the linker in your makefile!