![]() |
2010-10-14
, 15:58
|
Posts: 317 |
Thanked: 787 times |
Joined on Oct 2009
@ Krakow, Poland
|
#2
|
¿why with 'helloworld' recognize the comments types '//' and with the 'helloworld make' not (only recognize the comments types '/**/'?
¿why doesn't recongnize the files .h library gsgstreamer-0.10/gst/gst.h defined in gst.h and not recognize its functiions?
The Following User Says Thank You to dwaradzyn For This Useful Post: | ||
![]() |
2010-10-15
, 09:08
|
Posts: 11 |
Thanked: 0 times |
Joined on Oct 2010
|
#3
|
I have a problem, I am working with ESBox 's Maemo 5
with a virtual machine, and when I create a new project c basing on the template 'hello world (make)' and I delete it and I write this lines:
#include <stdio.h>
#include <clockd/libtime.h>
int main(void){
int i;
time_t tinicial=time_get_time();
for(i=0;i<400000;i++){
printf("Hola!");
}
time_t tfinal=time_get_time();
double segundos=difftime(tinicial,tfinal);
return 0;
}
I have an error: undefined reference to 'time_get_time'
I modify the makefile handly and I put the completes routes until the file 'clockd' and I add in Project->Properties->C/c++ Paths and Symbols y ahí, in GNU C, the complete route too. So it work ok
but then I deleted all that I had add in the makefile and then it work so good.... ¿what is the problem?
¿what is the difference to file 'helloworld' and 'helloworld (make)'?
¿why with 'helloworld' recognize the comments types '//' and with the 'helloworld make' not (only recognize the comments types '/**/'?
¿why doesn't recongnize the files .h library gsgstreamer-0.10/gst/gst.h defined in gst.h and not recognize its functiions?
¿why if I use the same code program whit 'helloworld' and 'helloworld (make)' not have got the same behaviour? for example the code is:
#include <stdio.h>
#include <time.h>
int main(void){
int i;
clock_id c= CLOCK_MONOTONIC;
struct timespec tinicial,tfinal;
int ti=clock_gettime(c,&tinicial);
for(i=0;i<400000;i++){
printf("Hola!");
}
int tf = clock_gettime(c,&tfinal);
double segundos= difftiem(tfinal.tv_sec,tinicial.tv_nsec);
long nanosegundos= tfinal.tv_nsec-tinicial.tv_nsec;
return 0;
}
Well ... with the template 'helloworld make' I have to add '#include <sys/types.h> because it doesnt recognize the type 'clock_id' but with 'helloworld' NOT
With the template 'helloword make' It not compile because it not recognize but with 'helloword' is all OK ¿why is the problem??
I am going crazy
sorry for my bad english