Properly export symbols from DLLs

This commit is contained in:
Paweł Bylica 2018-06-25 18:39:34 +02:00
parent 7b8e411583
commit 5372417ca6
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
4 changed files with 18 additions and 4 deletions

View File

@ -6,8 +6,9 @@
#pragma once
#include <evmc/evmc.h>
#include <evmc/utils.h>
/**
* Creates EVMC Example VM.
*/
struct evmc_instance* evmc_create_examplevm(void);
EVMC_EXPORT struct evmc_instance* evmc_create_examplevm(void);

View File

@ -6,6 +6,7 @@
#pragma once
#include <evmc/evmc.h>
#include <evmc/utils.h>
#include <stdint.h>
@ -191,7 +192,7 @@ struct evmc_instruction_metrics
* @return The pointer to the array of 256 instruction metrics. Null pointer in case
* an invalid EVM revision provided.
*/
const struct evmc_instruction_metrics* evmc_get_instruction_metrics_table(
EVMC_EXPORT const struct evmc_instruction_metrics* evmc_get_instruction_metrics_table(
enum evmc_revision revision);
/**
@ -203,7 +204,7 @@ const struct evmc_instruction_metrics* evmc_get_instruction_metrics_table(
* @return The pointer to the array of 256 instruction names. Null pointer in case
* an invalid EVM revision provided.
*/
const char* const* evmc_get_instruction_names_table(enum evmc_revision revision);
EVMC_EXPORT const char* const* evmc_get_instruction_names_table(enum evmc_revision revision);
#if __cplusplus
}

12
include/evmc/utils.h Normal file
View File

@ -0,0 +1,12 @@
/* EVMC: Ethereum Client-VM Connector API.
* Copyright 2018 Pawel Bylica.
* Licensed under the MIT License. See the LICENSE file.
*/
#pragma once
#ifdef _MSC_VER
#define EVMC_EXPORT __declspec(dllexport)
#else
#define EVMC_EXPORT __attribute__ ((visibility ("default")))
#endif

View File

@ -3,7 +3,7 @@
# Licensed under the MIT License. See the LICENSE file.
add_library(
instructions
instructions STATIC
${include_dir}/evmc/instructions.h
instruction_metrics.c
instruction_names.c