From c62200493c6003bcc282c02e820990d97b18123c Mon Sep 17 00:00:00 2001 From: Johan Vos Date: Tue, 28 Jul 2020 10:30:00 +0200 Subject: [PATCH] include object files into image Fix for #715 --- .../substrate/target/AbstractTargetConfiguration.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gluonhq/substrate/target/AbstractTargetConfiguration.java b/src/main/java/com/gluonhq/substrate/target/AbstractTargetConfiguration.java index c80cc54cc..1f990cf40 100644 --- a/src/main/java/com/gluonhq/substrate/target/AbstractTargetConfiguration.java +++ b/src/main/java/com/gluonhq/substrate/target/AbstractTargetConfiguration.java @@ -637,8 +637,8 @@ private static void writePatternEntry(BufferedWriter bw, String pattern) throws /** * Loops over every jar on the classpath that isn't a JavaFX jar and checks - * if it contains native static libraries (*.a or *.lib files). If found, the - * libraries are extracted into a temporary folder for use in the link step. + * if it contains native static libraries (*.a or *.lib files) or object files. If found, the + * libraries and object files are extracted into a temporary folder for use in the link step. * * @param classPath The classpath of the project * @throws IOException @@ -654,6 +654,9 @@ private void extractNativeLibs(String classPath) throws IOException { for (String jar : jars) { FileOps.extractFilesFromJar("." + getStaticLibraryFileExtension(), Path.of(jar), libPath, getTargetSpecificNativeLibsFilter()); + FileOps.extractFilesFromJar(".o" , Path.of(jar), + libPath, getTargetSpecificNativeLibsFilter()); + } }