Home  >  Article  >  Backend Development  >  Why Do I Get Eclipse Compilation Errors Even After Clean Builds?

Why Do I Get Eclipse Compilation Errors Even After Clean Builds?

Susan Sarandon
Susan SarandonOriginal
2024-11-03 22:54:30993browse

Why Do I Get Eclipse Compilation Errors Even After Clean Builds?

Eclipse Compilation Errors Despite Clean Builds: Semantic Errors Persistence

The Context:
You've encountered semantic errors in Eclipse Juno ADT after updating the NDK, despite successful compilations. The errors originate from OpenCV4Android symbols, particularly distance, pt, queryIdx, and trainIdx.

Troubleshooting:
Numerous attempts have been made, including project cleanup, rebuilding, refreshing, disabling/enabling the indexer, and adjusting include paths. However, the index remains broken.

Observations:

  • Command-line builds succeed (ndk-build clean, ndk-build).
  • Errors only appear in Eclipse after opening a C file (jni folder).
  • The project can build and deploy successfully if no C files are open.

Peculiarity:
Code utilizing queryIdx, pt, and line results in errors, while works when these symbols are explicitly defined.

Solution:

  1. Go to your project's Eclipse preferences: C/C General -> Code Analysis -> Launching.
  2. Uncheck both checkboxes and close them.
  3. Close and reopen the project (or restart Eclipse).
  4. Rebuild the project.

This modification disables invalid code analysis and resolves the semantic errors, ensuring correct code resolution.

The above is the detailed content of Why Do I Get Eclipse Compilation Errors Even After Clean Builds?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn