parent
b4aee4675a
commit
83766313a7
6 changed files with 51 additions and 0 deletions
@ -0,0 +1 @@ |
||||
usr/bin/prog?exe |
@ -0,0 +1,14 @@ |
||||
#if defined _WIN32 || defined __CYGWIN__ |
||||
#define DLL_PUBLIC __declspec(dllexport) |
||||
#else |
||||
#if defined __GNUC__ |
||||
#define DLL_PUBLIC __attribute__ ((visibility("default"))) |
||||
#else |
||||
#pragma message ("Compiler does not support symbol visibility.") |
||||
#define DLL_PUBLIC |
||||
#endif |
||||
#endif |
||||
|
||||
int DLL_PUBLIC func() { |
||||
return 0; |
||||
} |
@ -0,0 +1,11 @@ |
||||
#if defined _WIN32 || defined __CYGWIN__ |
||||
#define DLL_IMPORT __declspec(dllimport) |
||||
#else |
||||
#define DLL_IMPORT |
||||
#endif |
||||
|
||||
int DLL_IMPORT func(); |
||||
|
||||
int main(int argc, char **arg) { |
||||
return func(); |
||||
} |
@ -0,0 +1,6 @@ |
||||
project('shared library linking test', 'c', 'cpp') |
||||
|
||||
lib = shared_module('mylib', |
||||
'libfile.c' # Split to different lines before and after the comma to test parser. |
||||
, install : false) # Don't install libraries in common tests; the path is platform-specific |
||||
exe = executable('prog', 'main.c', link_with : lib, install : true) |
Loading…
Reference in new issue