>first.c:27:1: warning: implicit declaration of function
‘Tspi_Context_GetTPMObject’ [-Wimplicit-function-
>declaration]
> Tspi_Context_GetTPMObject(hContext, &hTPM);


The warning says that you're using the function that the compiler hasn't
seen a declaration.
If you go to src/tspi, do a 'grep -r Tspi_Context* *' you'll see
'Tspi_Context_GetTpmObject'
instead of Tspi_Context_GetTPMObject in your code.



Vicky

On Tue, Dec 30, 2014 at 7:33 PM, Massimo Gaggiano <[email protected]>
wrote:

> Hi all TrouSerS-users!
>
> I wrote my first sample program:
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> #include <tss/tss_error.h>
> #include <tss/platform.h>
> #include <tss/tss_defines.h>
> #include <tss/tss_typedef.h>
> #include <tss/tss_structs.h>
> #include <tss/tspi.h>
> #include <trousers/trousers.h>
>
> int main(int argc, char **argv){
>     TSS_HCONTEXT hContext;
>     TSS_HTPM hTPM;
>
>     Tspi_Context_Create(&hContext);
>     Tspi_Context_Connect(hContext, NULL);
>
>     Tspi_Context_GetTPMObject(hContext, &hTPM);
>
>     Tspi_Context_Close(hContext);
>     return 0;
> }
>
> Compilation gives me this message:
> [max@localhost trousers-0.3.13]$ gcc first.c -o first.out -Wall -ltspi
> first.c: In function ‘main’:
> first.c:27:1: warning: implicit declaration of function
> ‘Tspi_Context_GetTPMObject’ [-Wimplicit-function-declaration]
>  Tspi_Context_GetTPMObject(hContext, &hTPM);
>  ^
> /tmp/ccln7cs9.o: in function "main":
> first.c:(.text+0x55): undefined reference to "Tspi_Context_GetTPMObject"
> collect2: error: ld returned 1 exit status
>
> I tried without ‘Tspi_Context_GetTPMObject’ call and the compilation
> succeeded.
> Can someone help me?
>
> Thank you!
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> TrouSerS-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/trousers-users
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users

Reply via email to