undefined reference: TimerTimout

bridged with qnx.development_tools
Post Reply
Alain Achkar

undefined reference: TimerTimout

Post by Alain Achkar » Thu Apr 28, 2005 3:09 am

Hello,

I'm using QNX6.3.0 SP1 Standard Edition. We use "Boost-Build v2" to
build our projects. When the following line is invoked:
---------------------------------------------
c:/QNX630/host/win32/x86/usr/bin/qcc -static -Bstatic -o
"bin\qnx\debug\link-static\tst.exe"
"bin\qnx\debug\link-static\tst_main.o"
"d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a"
"d:\home\code\acacetus\products\lib.sci\generic\bin\qnx\debug\link-static\sci_qnx.a"

---------------------------------------------

We get the following error from the linker:

---------------------------------------------
d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a(sci_qnx_ser_rx_t.o):
In function `sci_qnx_ser_rx_t':
/cygdrive/d/home/code/acacetus/products/lib.sci/qnx_ser/sci_qnx_ser_rx_t.c:97:
undefined reference to `TimerTimout'
cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-ld caught signal 1
---------------------------------------------

line 97 reads as follows:

TimerTimout(CLOCK_REALTIME, flags, &event, &timeout_nanosec, NULL);

If I comment it out, everything works fine. The docs say that
TimerTimeout is part of the standard library (libc), and I am using many
other functions from the standard library in this code, however, the
only problem I get is when I use TimerTimeout.

Any ideas?

Alain.

Warren Deitch

Re: undefined reference: TimerTimout

Post by Warren Deitch » Thu Apr 28, 2005 4:16 am

You have mis-spelt the name

TimerTimeout () not TimerTimout ()

Alain Achkar wrote:
Hello,

I'm using QNX6.3.0 SP1 Standard Edition. We use "Boost-Build v2" to
build our projects. When the following line is invoked:
---------------------------------------------
c:/QNX630/host/win32/x86/usr/bin/qcc -static -Bstatic -o
"bin\qnx\debug\link-static\tst.exe"
"bin\qnx\debug\link-static\tst_main.o"
"d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a"
"d:\home\code\acacetus\products\lib.sci\generic\bin\qnx\debug\link-static\sci_qnx.a"

---------------------------------------------

We get the following error from the linker:

---------------------------------------------
d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a(sci_qnx_ser_rx_t.o):
In function `sci_qnx_ser_rx_t':
/cygdrive/d/home/code/acacetus/products/lib.sci/qnx_ser/sci_qnx_ser_rx_t.c:97:
undefined reference to `TimerTimout'
cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-ld caught signal 1
---------------------------------------------

line 97 reads as follows:

TimerTimout(CLOCK_REALTIME, flags, &event, &timeout_nanosec, NULL);
^e

If I comment it out, everything works fine. The docs say that
TimerTimeout is part of the standard library (libc), and I am using many
other functions from the standard library in this code, however, the
only problem I get is when I use TimerTimeout.

Any ideas?

Alain.

Alain Achkar

Re: undefined reference: TimerTimout

Post by Alain Achkar » Thu Apr 28, 2005 8:04 pm

Thanks. Shouldn't the compiler fail with an error message for that?
(Since there's no function prototype for it)

Warren Deitch wrote:
You have mis-spelt the name

TimerTimeout () not TimerTimout ()

Alain Achkar wrote:

Hello,

I'm using QNX6.3.0 SP1 Standard Edition. We use "Boost-Build v2" to
build our projects. When the following line is invoked:
---------------------------------------------
c:/QNX630/host/win32/x86/usr/bin/qcc -static -Bstatic -o
"bin\qnx\debug\link-static\tst.exe"
"bin\qnx\debug\link-static\tst_main.o"
"d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a"
"d:\home\code\acacetus\products\lib.sci\generic\bin\qnx\debug\link-static\sci_qnx.a"

---------------------------------------------

We get the following error from the linker:

---------------------------------------------
d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a(sci_qnx_ser_rx_t.o):
In function `sci_qnx_ser_rx_t':
/cygdrive/d/home/code/acacetus/products/lib.sci/qnx_ser/sci_qnx_ser_rx_t.c:97:
undefined reference to `TimerTimout'
cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-ld caught signal 1
---------------------------------------------

line 97 reads as follows:

TimerTimout(CLOCK_REALTIME, flags, &event, &timeout_nanosec, NULL);

^e


If I comment it out, everything works fine. The docs say that
TimerTimeout is part of the standard library (libc), and I am using
many other functions from the standard library in this code, however,
the only problem I get is when I use TimerTimeout.

Any ideas?

Alain.


Mario Charest

Re: undefined reference: TimerTimout

Post by Mario Charest » Thu Apr 28, 2005 9:07 pm

"Alain Achkar" <js@simplytech.com> wrote in message
news:d4rf89$61k$1@inn.qnx.com...
Thanks. Shouldn't the compiler fail with an error message for that? (Since
there's no function prototype for it)
If you have warning enabled.
Warren Deitch wrote:
You have mis-spelt the name

TimerTimeout () not TimerTimout ()

Alain Achkar wrote:

Hello,

I'm using QNX6.3.0 SP1 Standard Edition. We use "Boost-Build v2" to
build our projects. When the following line is invoked:
---------------------------------------------
c:/QNX630/host/win32/x86/usr/bin/qcc -static -Bstatic -o
"bin\qnx\debug\link-static\tst.exe"
"bin\qnx\debug\link-static\tst_main.o"
"d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a"
"d:\home\code\acacetus\products\lib.sci\generic\bin\qnx\debug\link-static\sci_qnx.a"
---------------------------------------------

We get the following error from the linker:

---------------------------------------------
d:\home\code\acacetus\products\lib.sci\qnx_ser\bin\qnx\debug\link-static\sci_qnx_ser.a(sci_qnx_ser_rx_t.o):
In function `sci_qnx_ser_rx_t':
/cygdrive/d/home/code/acacetus/products/lib.sci/qnx_ser/sci_qnx_ser_rx_t.c:97:
undefined reference to `TimerTimout'
cc: C:/QNX630/host/win32/x86/usr/bin/ntox86-ld caught signal 1
---------------------------------------------

line 97 reads as follows:

TimerTimout(CLOCK_REALTIME, flags, &event, &timeout_nanosec, NULL);

^e


If I comment it out, everything works fine. The docs say that
TimerTimeout is part of the standard library (libc), and I am using many
other functions from the standard library in this code, however, the
only problem I get is when I use TimerTimeout.

Any ideas?

Alain.



David Gibbs

Re: undefined reference: TimerTimout

Post by David Gibbs » Fri Apr 29, 2005 2:29 pm

Alain Achkar <js@simplytech.com> wrote:
Thanks. Shouldn't the compiler fail with an error message for that?
(Since there's no function prototype for it)
That's just a warning. Whether or not it's generated depends on
what level of warnings you have requested.

The C language will "automatically" prototype functions based on
the given parameters when it first sees the function.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

Alain Achkar

Re: undefined reference: TimerTimout

Post by Alain Achkar » Wed May 04, 2005 3:41 pm

David Gibbs wrote:
Alain Achkar <js@simplytech.com> wrote:

Thanks. Shouldn't the compiler fail with an error message for that?
(Since there's no function prototype for it)


That's just a warning. Whether or not it's generated depends on
what level of warnings you have requested.

The C language will "automatically" prototype functions based on
the given parameters when it first sees the function.

-David
Thanks!
Alain.

Post Reply

Return to “qnx.development_tools”