Skip to content

Fatal error: 'cpu-features.h' file not found #106

Closed

Description

@leshchenko

I downloaded lib and copied it to my project directory. My CMakeLists.txt :

 cmake_minimum_required(VERSION 3.6)

 add_subdirectory(cpu_features)

 add_library(
     myLib
     SHARED
     app/src/main/cpp/test.cpp
)
 
 link_libraries(myLib cpu_features)

My test.cpp file:

#include "test.h"
#include <cpu-features.h>

I have 10: fatal error: 'cpu-features.h' file not found error.

Please tell me what I'm doing wrong.
Thanks.

Activity

  1. Mizux commented on Feb 5, 2020

    @Mizux
    Collaborator
  2. added
    help wanted
    on Feb 5, 2020
  3. added a commit that references this issue on Feb 5, 2020
  4. leshchenko commented on Feb 5, 2020

    @leshchenko
    Author

    @Mizux Thanks for the quick reply. Could you please help me in case I want to use cpu-features.h from https://github.com/google/cpu_features/tree/master/ndk_compat ?

  5. Mizux commented on Feb 5, 2020

    @Mizux
    Collaborator

    in this cas e you should have something like this I guess (not tested):

    ...
    add_subdirectory(cpu_features/ndk_compat)
    
     add_library(
         myLib
         SHARED
         app/src/main/cpp/test.cpp
    )
      target_link_libraries(myLib ndk_compat)
  6. gchatelet commented on Sep 21, 2020

    @gchatelet
    Collaborator

    @leshchenkoEk can you confirm that it works now?

  7. removed
    help wanted
    on Sep 21, 2020
  8. added a commit that references this issue on Sep 21, 2020
    925c227
  9. Mizux commented on Sep 21, 2020

    @Mizux
    Collaborator

    Should be fixed by my patch see the comment in the PR...

  10. added this to the Release v0.5.0 milestone on Sep 21, 2020
  11. added
    bug
    on Sep 22, 2020
  12. added a commit that references this issue on Feb 18, 2024
    91f525c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions