Attempt at fixing undefined references to dlerror, dlsym, dlclose and dladdr.

This commit is contained in:
tschumann 2025-02-22 12:50:59 +10:00 committed by Nicholas Hastings
parent e4e48d4913
commit f4cb43c9e2

View File

@ -17,6 +17,9 @@ for cxx in MMS.all_targets:
if binary.compiler.target.platform == 'linux' and binary.compiler.target.arch == 'x86_64': if binary.compiler.target.platform == 'linux' and binary.compiler.target.arch == 'x86_64':
binary.compiler.defines += ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"'] binary.compiler.defines += ['LIB_PREFIX="lib"', 'LIB_SUFFIX=".so"']
if binary.compiler.target.platform == 'linux':
binary.compiler.linkflags += ['ldl']
# TODO: hack - something makes it try and compile with /SUBSYSTEM:WINDOWS which then causes it to complain that WinMain is missing # TODO: hack - something makes it try and compile with /SUBSYSTEM:WINDOWS which then causes it to complain that WinMain is missing
if binary.compiler.target.platform == 'windows': if binary.compiler.target.platform == 'windows':
binary.compiler.linkflags = ['Advapi32.lib', 'kernel32.lib', 'shell32.lib'] binary.compiler.linkflags = ['Advapi32.lib', 'kernel32.lib', 'shell32.lib']