- Jul 23, 2006
- 3,934
- 0
- 76
I've been working on a Modbus library for an embedded system, however I've been doing most of the design and testing just using Netbeans (on Windows) and some simulation programs to ease development. I'm to the point that I want to start checking performance with some timers and from I've read, on Windows my main options are:
timeGetTime() ~ 1ms resolution
QueryPerformanceCounter() ~ microsecond resolution
Now when I try to use timeGetTime I get the following error:
C:/..../modbus/main.c:56: undefined reference to `timeGetTime@0'
I gather this is some error with the compiler not knowing where to find the library? For the record I have included windows.h (which should include the requisite mmsystem.h). I'm a little confused on how exactly I go about determining how to fix this. I've tried adding a -lwinmm to both the compiler and the linker but it still can't find timeGetTime.
It's not a problem with all windows libraries either, I have the serial communications working just fine and Query PerformanceCounter works as well.
timeGetTime() ~ 1ms resolution
QueryPerformanceCounter() ~ microsecond resolution
Now when I try to use timeGetTime I get the following error:
C:/..../modbus/main.c:56: undefined reference to `timeGetTime@0'
I gather this is some error with the compiler not knowing where to find the library? For the record I have included windows.h (which should include the requisite mmsystem.h). I'm a little confused on how exactly I go about determining how to fix this. I've tried adding a -lwinmm to both the compiler and the linker but it still can't find timeGetTime.
It's not a problem with all windows libraries either, I have the serial communications working just fine and Query PerformanceCounter works as well.