Can't resolve _____

已回答

Hi,

I have 96 "Can't resolve type '___' " warnings.

Is there a comment I can use to disable such type warnings manually, and reenable them manually, since I'm using an unsupported compiler and building manually. I'd quite like to not have to disable code analaysis for the current file if there was an alternative way of turning it off and on manually, for more specific stretches of code?

Thanks for your time!

 

0

Hello!

In order to make CLion understand some specific types, you can try adding the compiler headers to your project using the include_directories CMake command in the CMakeLists.txt. This might help, but I can't promise it for sure.

Also you can try adding something similar to the following code into some header file:

#ifdef __CLION_IDE__
#define _some_type
#endif

 

 Also feel free to comment or upvote the feature request about support for custom compiler: https://youtrack.jetbrains.com/issue/CPP-9615.

0
Avatar
Permanently deleted user

Thanks for the help!

0
Avatar
Permanently deleted user

How can we turn off all of these warnings (without code changes)?

0

Hi, Marko.

You can disable inspections in File | Settings | Editor | Inspections. Also are web help articles about disabling inspections and about suppressing inspections might be helpful. Please be aware that, unfortunately, not all inspections can be disabled or suppressed.

0
Avatar
Permanently deleted user

Thanks Anna, but disabling inspections doesn't turn off "Can't resolve type '___' " warnings. This unfortunately makes CLion less useful for editing certain files.

0

That happens because not all inspections can be disabled or suppressed. Sorry for the inconvenience.

0

请先登录再写评论。