c - Help me with the simplest program for "Trusted" application -


I hope someone from a large community here can write a simple "trusted" program that I can extend.

I am using Ubuntu Linux 9.04, in which TPM emulator is 0.60 from Mario Straiser (). I have installed emulator and emulsifier, and after running tpmd and tcsd daemon, the program can run successfully from tpm-tools.

I hope that I will start developing my application, but I have a problem compiling code below.

  #include & lt; Slabs / tss.h & gt; # Include & lt; Trousers / trousers.h & gt; # Include & lt; Stdio.h & gt; TSS_HCONTEXT hContext; Int main () {Tspi_Context_Create (& amp; hContext); Tspi_Context_Close (hContext); Return 0; }  

Try to compile with G ++ tpm.cpp -o tpmexe

I receive an error later. Undefined reference to 'Tspi_Context_Close' for unsecured reference for 'Tspi_Context_Create' Undefined reference to 'Tspi_Context_Close' I have included # to successfully compile it? Am i missing something I'm familiar with C, but not with the Linux / Unix programming environment at all.

ps: I am a part-time student in the Master of Information Security program. My involvement with programming is largely for educational purposes.

You have to link to the library.

Try this:

  g ++ tpm.cpp -o tpmexe -ltspi  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -