Closed sincak closed 5 months ago
Hello, it's can be used for Android Device? pls. help me understand it
Standard math library needs to be linked after compilation (makefile needs to be updated so gcc is called with -lm option).
To follow up, CMakeList should be updated to something like so:
cmake_minimum_required(VERSION 3.11)
project(Madgwick_Filter)
# Should be in a subdirectory
add_library(madgwick SHARED madgwickFilter.c)
target_include_directories(madgwick PUBLIC ${PROJECT_SOURCE_DIR}/)
add_executable(${PROJECT_NAME} main.c)
# Link the math library for the executable
target_link_libraries(${PROJECT_NAME}
madgwick
m # Link with the math library
)
Should be fixed with latest commit.
Issue closed
Standard math library needs to be linked after compilation (makefile needs to be updated so gcc is called with -lm option).