Fix the C++ Link issue and Add the static lib
1. When including the header file in C++ project, the linker cannot find the functions. 2. Add the staticlib building. Signed-off-by: yuanwu <yuan.wu@intel.com>
This commit is contained in:
		
							parent
							
								
									765d019bbf
								
							
						
					
					
						commit
						9d490ada58
					
				| @ -10,15 +10,15 @@ | |||||||
| #include "sgx_pce.h" | #include "sgx_pce.h" | ||||||
| #include "sgx_error.h" | #include "sgx_error.h" | ||||||
| 
 | 
 | ||||||
| void *dcap_quote_open(void); | extern "C" void *dcap_quote_open(void); | ||||||
| 
 | 
 | ||||||
| uint32_t dcap_get_quote_size(void *handle); | extern "C" uint32_t dcap_get_quote_size(void *handle); | ||||||
| 
 | 
 | ||||||
| int32_t dcap_generate_quote(void *handle, uint8_t *quote_buf, const sgx_report_data_t *report_data); | extern "C" int32_t dcap_generate_quote(void *handle, uint8_t *quote_buf, const sgx_report_data_t *report_data); | ||||||
| 
 | 
 | ||||||
| uint32_t dcap_get_supplemental_data_size(void *handle); | extern "C" uint32_t dcap_get_supplemental_data_size(void *handle); | ||||||
| 
 | 
 | ||||||
| int32_t dcap_verify_quote(void *handle, | extern "C" int32_t dcap_verify_quote(void *handle, | ||||||
|                           const uint8_t *quote_buf, |                           const uint8_t *quote_buf, | ||||||
|                           uint32_t quote_size, |                           uint32_t quote_size, | ||||||
|                           uint32_t *collateral_expiration_status, |                           uint32_t *collateral_expiration_status, | ||||||
| @ -27,4 +27,4 @@ int32_t dcap_verify_quote(void *handle, | |||||||
|                           uint8_t *supplemental_data); |                           uint8_t *supplemental_data); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| void dcap_quote_close(void *handle); | extern "C" void dcap_quote_close(void *handle); | ||||||
|  | |||||||
| @ -11,4 +11,4 @@ sgx_types = { path = "../../../../deps/rust-sgx-sdk/sgx_types" } | |||||||
| libc = "0.2" | libc = "0.2" | ||||||
| 
 | 
 | ||||||
| [lib] | [lib] | ||||||
| crate-type = ["cdylib", "rlib"] | crate-type = ["cdylib", "rlib", "staticlib"] | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user