Skip to content

multiple definition of 'main' when trying to build the StockfishServiceTest project #1

@lazydroid

Description

@lazydroid

When trying to build the test project using the latest Android Studio 2.3.3, the StockfishService sub project compilation fails with the:

StockfishServiceTest/stockfishservice/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/feature_tests.cxx
Error:(405) multiple definition of main' StockfishServiceTest/stockfishservice/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/feature_tests.c Error:(34) multiple definition of main'
StockfishServiceTest/stockfishservice/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/feature_tests.cxx
Error:(405) multiple definition of main' StockfishServiceTest/stockfishservice/.externalNativeBuild/cmake/debug/armeabi/CMakeFiles/feature_tests.cxx Error:(405) multiple definition of main'

seems like there are plenty of feature_tests.cxx files generated for various architectures, and they clash with each other. how can this be solved?

CMakeLists.txt includes

file(GLOB_RECURSE engine_SRCS ./*.c*)

which may be the reason why all these files are collected recursively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions