| Summary: | False error message: Symbol 'CLOCKS_PER_SEC' could not be resolved | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | oliremez | ||||
| Component: | cdt-indexer | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Anton Leherbauer <aleherb+eclipse> | ||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | cdtdoug | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.1.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | 197989 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
* Please create a parser log for the test file (Context menu of file in project explorer - Index - Create parser log). * Also, try to find the header file that defines CLOCKS_PER_SEC and attach it to the bug. * Check the project setting 'C/C++ General - Index - Files to index up-front', what does it contain? No response from submitter. (In reply to comment #2) > No response from submitter. Had the like problem. Created the sample project above, compiled it. Yes, same errors. -- added correct #include path to the project project->options->paths->includes->GnuC->include directories. (J:\cygwin\usr\include in my case) Now this compiles correctly. /** "the like problem" means that I had to change #include <ctime> to #include <time.h> because there was no ctime.h in my cygwin. Also the #include <time> did not work. **/ -- returned to my project (closed the sample project), added the same path as above, to it. Everything works. (Indigo/Cygwin) Seems this was not a bug. Created attachment 208429 [details]
The PArrser Log File
Comment on attachment 208429 [details]
The PArrser Log File
Including <ctime> or time.h
Does not fix the problem. The definition is reported missing but the code compiles normally.
Comment on attachment 208429 [details]
The PArrser Log File
Eclipse Platform
Version: 3.7.1
Build id: R3_7_1
I can reproduce the issue using gcc 4.6.2 on a linux host. It is fixed by what we have done for bug 197989. |
Build Identifier: 20110615-0604 The Editor shows the error Symbol 'CLOCKS_PER_SEC' could not be resolved However, the required header file <ctime> is available and the code can be compiled without problems. Reproducible: Always Steps to Reproduce: Create following document and execute #include <ctime> int main( void ) { double foo = 3.1415 / CLOCKS_PER_SEC; return 0; }