LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

projet CVI sous Linux/GCC : undefined reference timer_create, timer_delete ...

I have checked several samples under Eclipse/gcc
serial, uirview, tankdemo, arrayfile, menudemo, tablecells, listbox, treemenu, timer
and everything works fine
except for "asyncdem"
 
in asynctmr.c, I have a fault message "undefined reference to 'timer_settime', 'clock_gettime', 'timer_create' ...
 
Normally in default source file given by NI, these functions are a part of <time.h> which is declared bellow.
But in this file there is no such declaration;
 
I have changed the declaration <time.h> to "time.h" with a specific path " /usr/include" where these functions are correctly defined.
The compilation seems OK.
But the final building is still not successfull ...
 
 
 
0 Kudos
Message 1 of 3
(8,145 Views)

Asyncronous timers are strictly related to Windows environment: infact they are built using Windows Multimedia timers, the instrument relies on winmm.dll to load when creating a new timer and so on. Even without specific knowledge of Linux OS, I am pretty sure that this sample code won't work in it Smiley Surprised



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(8,136 Views)
Actually, the async timer library was ported to linux with the release of the CVI runtime for linux. The timing libraries it depends on (at least on my system) live in librt, so if you add "-lrt" to your link command line, it should link fine. If you use cvicc to compile the project for you, it will link against this library automatically.

Hope this helps,

-alex
0 Kudos
Message 3 of 3
(8,123 Views)