帮我设计一个最简单的“受信任”程序应用
我希望这里的大社区中的任何人都可以帮助我编写可以扩展的最简单的“可信”程序。
我正在使用 Ubuntu Linux 9.04,以及来自 Mario Strasser 的 TPM 模拟器 0.60 (http://tpm-emulator.berlios。德/)。我已经安装了模拟器和 Trousers,并且在运行 tpmd 和 tcsd 守护进程后可以成功运行 tpm-tools 中的程序。
我希望开始开发我的应用程序,但我在编译下面的代码时遇到问题。
#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;
}
尝试编译后
g++ tpm.cpp -o tpmexe
我收到错误
undefined reference to 'Tspi_Context_Create'
undefined reference to 'Tspi_Context_Close'
我必须 #include 才能成功编译它?有什么我想念的吗?我熟悉 C,但不太熟悉 Linux/Unix 编程环境。
ps:我是信息安全硕士课程的兼职学生。我参与编程主要是为了学术目的。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要链接到该库。
试试这个:
You need to link to the library.
Try this: