Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 396713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:34:45+00:00 2026-05-12T16:34:45+00:00

I hope anyone from the large community here can help me write the simplest

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T16:34:45+00:00Added an answer on May 12, 2026 at 4:34 pm

    You need to link to the library.

    Try this:

    g++ tpm.cpp -o tpmexe -ltspi
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am stuck and in need of a hand. Hope someone can help? Anyone
I'm new here and I hope anyonte can help me. I have WCF Service
Hope someone can help me and not sure if this should be here or
hope you can help. I am recording audio from a microphone and streaming it
I hope anyone can translate my abstract query. I want to select * from
I hope anyone can help me out in this topic, even if it's not
I'm having some problems with my stored procedure. Hope anyone can help me figure
hope someone can help. I have two tables: Users -UserID -UserName UsersType -UserTypeID -UserID
I hope someone may be able to help! We have a pretty large VB.Net
Really hope someone can help me or at least point me in the right

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.