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 hope someone may be able to help! We have a pretty large VB.Net
Does anyone know of a ORM tool for .Net that will work on a
I have a large C++ code base that I'm doing some refactoring on where
Before anyone suggests scrapping the table tags altogether, I'm just modifying this part of
I have 2 entities, A and B that have a many to many relationship.
Good day everyone. I am working on a Firefox extension, and I want to
UPDATE: Just to summarize what my question has boiled down to: I was hoping
Edit: I figured this out. jQuery Cycle plugin adds a z-index to every item
I've got the following piece of Jquery: $(#collapse-menu > li > a).click(function() { $(this).toggleClass(expanded).toggleClass(collapsed).find(+

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.