Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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