Community
Participate
Working Groups
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; }
* 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.