Skip to content

Linking with Foundation on Android gives error #3652

@hlewin

Description

@hlewin

When using normal cmake mechanisms (find_package, target_link_libraries) in an android-studio project results in a link error.
Problem is the "log" lib which is exported to consumers - it appears on the command-line of the consumer as
clang++ ..... log ..... which gives an error. This is easily fixed by exporting it with the -l prefix:

--- Foundation/CMakeLists.txt
+++ Foundation/CMakeLists.txt
@@ -219,7 +219,7 @@
 			POCO_NO_WSTRING
 			POCO_NO_SHAREDMEMORY
 	)
-	target_link_libraries(Foundation PUBLIC log)
+	target_link_libraries(Foundation PUBLIC -llog)
 endif()
 
 POCO_INSTALL(Foundation)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions