Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360907

Summary: CLOCKS_PER_SECOND CLOCK_MONOTONIC symbol not resolved, also other random not resolved errors such as printf
Product: [Tools] CDT Reporter: glepage <g>
Component: cdt-buildAssignee: cdt-build-inbox <cdt-build-inbox>
Status: RESOLVED INVALID QA Contact: Andrew Gvozdev <angvoz.dev>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description glepage CLA 2011-10-14 00:51:36 EDT
Build Identifier: 20110916-0149

The symbols CLOCK_MONOTONIC, CLOCKS_PER_SEC, clock_t always report as not resolved.
Occasionally other not resolved errors.

Overall inconsistent behavior, re-indexing does not appear to have an effect.

Have tried various combinations of include paths, sometimes Eclipse will not act as if no change is made, other times it will throw tons of errors.

I am using Ubuntu Server 10.04LTS 64 bit on a rack mount server. When I worked on this project last year I did not have this issue, I was using Eclipse at that time, although I can not remember the version at that time.

I also have a laptop that I develop on with the same OS as a virtual machine guest with a win 7 host and the same version of Eclipse, the exact same issue on both systems.

Same error regardless of using c or cpp. The project is obviously linked to librt  -lrt

Error output:

Description	Resource	Path	Location	Type
Symbol 'CLOCKS_PER_SECOND' could not be resolved	t5.c	/t5/src	line 17	Semantic Error
Type 'clock_t' could not be resolved	t5.c	/t5/src	line 17	Semantic Error


On a side note, GIT commit crashes Eclipse everytime, regardless of JVM used (to be addressed in another bug report)

Reproducible: Always

Steps to Reproduce:
Lets take the example right from the gnu site:

headers tried: <time.h>  and <sys/time.h>


clock_t start, end;
double cpu_time_used;

start = clock();

end = clock();
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;

also

clock_gettime(CLOCK_MONOTONIC, &tmSpc);
Comment 1 glepage CLA 2011-10-14 01:06:03 EDT
Ok I got it working with Helios build 20110218-0911.

I have tried multiple times with fresh copies of Indigo, build already specified, to no avail.
Comment 2 Andrew Gvozdev CLA 2011-10-14 11:00:38 EDT
That sounds like a setup issue. Bugzilla is used by developers team to keep track of development issues not  setup problems. Please, ask in user forums http://www.eclipse.org/forums/ -> Language IDEs -> CDT.