Skip to content

Commit

Permalink
Fix Windows build. (#8864)
Browse files Browse the repository at this point in the history
  - Some Functions were undefined for MinGW after the changes in #8857.
  - They were put under the macro just for MSVC. They should be defined
    for both MinGW and MSVC.
  • Loading branch information
mahge committed Apr 25, 2022
1 parent c08d0b7 commit d29d327
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions OMCompiler/SimulationRuntime/c/util/omc_msvc.c
Expand Up @@ -272,15 +272,6 @@ int omc_dlclose(void *handle)
return FreeLibrary(handle);
}


#if defined(_MSC_VER)
/* no dladdr on MSVC */
int omc_dladdr(void *addr, Dl_info *info)
{
return 0;
}


void* dlopen(const char *filename, int flag) {
return omc_dlopen(filename, flag);
}
Expand All @@ -303,6 +294,12 @@ int dladdr(void *addr, Dl_info *info) {



#if defined(_MSC_VER)
/* no dladdr on MSVC */
int omc_dladdr(void *addr, Dl_info *info)
{
return 0;
}
#else /* MINGW */

/*
Expand Down

0 comments on commit d29d327

Please sign in to comment.