Help me with the simplest program for "Trusted" application
Posted
by idazuwaika
on Stack Overflow
See other posts from Stack Overflow
or by idazuwaika
Published on 2009-10-19T08:59:57Z
Indexed on
2010/03/31
7:03 UTC
Read the original article
Hit count: 284
Hi,
I hope anyone from the large community here can help me write the simplest "Trusted" program that I can expand from.
I'm using Ubuntu Linux 9.04, with TPM emulator 0.60 from Mario Strasser (http://tpm-emulator.berlios.de/). I have installed the emulator and Trousers, and can successfully run programs from tpm-tools after running tpmd and tcsd daemons.
I hope to start developing my application, but I have problems compiling the code below.
#include <trousers/tss.h>
#include <trousers/trousers.h>
#include <stdio.h>
TSS_HCONTEXT hContext;
int main()
{
Tspi_Context_Create(&hContext);
Tspi_Context_Close(hContext);
return 0;
}
After trying to compile with
g++ tpm.cpp -o tpmexe
I receive errors
undefined reference to 'Tspi_Context_Create'
undefined reference to 'Tspi_Context_Close'
What do I have to #include to successfully compile this? Is there anything that I miss? I'm familiar with C, but not exactly so with Linux/Unix programming environment.
ps: I am a part time student in Master in Information Security programme. My involvement with programming has been largely for academic purposes.
© Stack Overflow or respective owner