Skip to content

Commit 2c9b68f

Browse files
authored
[TEST] load the .dylib files on macos in the singleton test (#3316)
1 parent b4328c0 commit 2c9b68f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/test/singleton/singleton_test.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ void do_something()
5656

5757
# ifdef _WIN32
5858
HMODULE component_g = LoadLibraryA("component_g.dll");
59+
# elif defined(__APPLE__)
60+
void *component_g = dlopen("libcomponent_g.dylib", RTLD_NOW);
5961
# else
6062
void *component_g = dlopen("libcomponent_g.so", RTLD_NOW);
6163
# endif
@@ -82,6 +84,8 @@ void do_something()
8284

8385
# ifdef _WIN32
8486
HMODULE component_h = LoadLibraryA("component_h.dll");
87+
# elif defined(__APPLE__)
88+
void *component_h = dlopen("libcomponent_h.dylib", RTLD_NOW);
8589
# else
8690
void *component_h = dlopen("libcomponent_h.so", RTLD_NOW);
8791
# endif

0 commit comments

Comments
 (0)