HEADS-project / training

Training material to get started with the HEADS technologies
10 stars 16 forks source link

Compilation error when compiling TestTimerC (in cygwin) #2

Closed kehusa closed 9 years ago

kehusa commented 9 years ago

KnutEilif@KnutEilif-PC /cygdrive/c/Users/KnutEilif/HeadsIde/workspace/Tutorial/thingml-gen/posix/TestTimerC $ make cc -O2 -w -c ClockLinux.c ClockLinux.c: In function ‘f_ClockLinux_sleep_ms’: ClockLinux.c:29:16: error: storage size of ‘tv’ isn’t known struct timeval tv; ^ Makefile:10: recipe for target 'ClockLinux.o' failed make: *\ [ClockLinux.o] Error 1

ffleurey commented 9 years ago

It looks like your cygwin is missing some sort of time library or have a different version than the one we used in the sample.

brice-morin commented 9 years ago

Yes, I confirm it works on Ubuntu (in my virtual box) but not on CygWin. It is not so clear how to fix the issue rapidly. I suspect we have to use a completely different lib and make sure it is "portable".

Anyway, you can continue the tutorial with other languages and exercices :-)

brice-morin commented 9 years ago

The C compiler first targets proper platforms (Linux and micro-controllers). It was a bit ambitious to target Windows directly with this compiler, even through CygWin. I suggest we close that issue, unless it is blocking for anyone (who can reopen it).