QNX6.2.1 Link Problem

QNX6.2.1 Link Problem

I’m trying to compile a simple program that uses a member of the libsocket.a
library (connect()). I key “qcc -o mypgm mypgm.c” and get the error message
“/tmp/AAA253420_cc.o: In function ‘main’:
/tmp/AAA253420_cc.o(.text+0x41): undefined reference to ‘connect’”

I figured libsocket.a is not in the linker’s path, however, according to
documentation and the /etc/qcc/gcc_ntox86.conf file, the linker should see
the library because it is in /x86/lib.

Please help, I’m beginning to pull out the little hair I still have left on
my balding old scalp!

Thanks in advance,

Eric

“Eric” <ricanz58@yahoo.com> wrote in message
news:cthfvm$57g$1@inn.qnx.com

QNX6.2.1 Link Problem

I’m trying to compile a simple program that uses a member of the
libsocket.a
library (connect()). I key “qcc -o mypgm mypgm.c” and get the error
message
“/tmp/AAA253420_cc.o: In function ‘main’:
/tmp/AAA253420_cc.o(.text+0x41): undefined reference to ‘connect’”

I figured libsocket.a is not in the linker’s path, however, according to
documentation and the /etc/qcc/gcc_ntox86.conf file, the linker should see
the library because it is in /x86/lib.

Please help, I’m beginning to pull out the little hair I still have left
on
my balding old scalp!

You have to tell qcc to link with the socket library with -lsocks

Thanks in advance,

Eric

Thanks very much Mario. I used “qcc -lsocket …” to direct the linker to
the libsocket.a library and everything is great now.

Eric

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ctj8hm$e29$1@inn.qnx.com

“Eric” <> ricanz58@yahoo.com> > wrote in message
news:cthfvm$57g$> 1@inn.qnx.com> …
QNX6.2.1 Link Problem

I’m trying to compile a simple program that uses a member of the
libsocket.a
library (connect()). I key “qcc -o mypgm mypgm.c” and get the error
message
“/tmp/AAA253420_cc.o: In function ‘main’:
/tmp/AAA253420_cc.o(.text+0x41): undefined reference to ‘connect’”

I figured libsocket.a is not in the linker’s path, however, according to
documentation and the /etc/qcc/gcc_ntox86.conf file, the linker should
see
the library because it is in /x86/lib.

Please help, I’m beginning to pull out the little hair I still have left
on
my balding old scalp!

You have to tell qcc to link with the socket library with -lsocks


Thanks in advance,

Eric
\

“Eric” <ricanz58@yahoo.com> wrote in message
news:ctk39r$1ki$1@inn.qnx.com

Thanks very much Mario.

You are welcome, hopefully I help saved some hair.

I used “qcc -lsocket …” to direct the linker to

the libsocket.a library and everything is great now.

Eric

“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ctj8hm$e29$> 1@inn.qnx.com> …

“Eric” <> ricanz58@yahoo.com> > wrote in message
news:cthfvm$57g$> 1@inn.qnx.com> …
QNX6.2.1 Link Problem

I’m trying to compile a simple program that uses a member of the
libsocket.a
library (connect()). I key “qcc -o mypgm mypgm.c” and get the error
message
“/tmp/AAA253420_cc.o: In function ‘main’:
/tmp/AAA253420_cc.o(.text+0x41): undefined reference to ‘connect’”

I figured libsocket.a is not in the linker’s path, however, according
to
documentation and the /etc/qcc/gcc_ntox86.conf file, the linker should
see
the library because it is in /x86/lib.

Please help, I’m beginning to pull out the little hair I still have
left
on
my balding old scalp!

You have to tell qcc to link with the socket library with -lsocks


Thanks in advance,

Eric


\