|
| Watcom link issue on libc |
 |
Wed, 14 Nov 2007 15:14:38 GMT |
Hi everyone,
I am new to NLM programming world. I am trying to grub CPU information by
'netware_cpu_info' lib call, which is located inside libc, I think. My
problem is that I don't know how to link libc of novell within watcom
linker. I have downloaded and installed the NDK. Inside the lib folder of
libc, there are some NLM files. Watcom linker said they were 'invalid
library file attribute'. Can anybody shed some light on me?
Thanks in advance,
-Michael
|
| Post Reply
|
| Re: Watcom link issue on libc |
 |
Thu, 15 Nov 2007 01:26:47 GMT |
Hi Michael,
"Michael Chen" <mchen@tannerycreeksystems.com> wrote in
news:yhE_i.5626
$7U6.4774@kovat.provo.novell.com:
> I am new to NLM programming world. I am trying to grub CPU information by
> 'netware_cpu_info' lib call, which is located inside libc, I think. My
> problem is that I don't know how to link libc of novell within watcom
> linker. I have downloaded and installed the NDK. Inside the lib folder of
> libc, there are some NLM files. Watcom linker said they were 'invalid
> library file attribute'. Can anybody shed some light on me?
you need to link with the imp files;
here's a sample - edit the makefile and set the paths to the NDK and tools
properly:
http://www.gknw.net/development/samples/watcom/nwinfo.zip
HTH, Günter.
|
| Post Reply
|
| Re: Watcom link issue on libc |
 |
Thu, 15 Nov 2007 20:01:06 GMT |
Hi Guenter,
Thanks for you instruction. After importing libc.imp in the lnk file(I am
using GNU make), I got the link stage passed. The new issue introduced by
importing libc.imp is that the printf function doesn't output to the console
any more as it used to be. Maybe there is some kind of confliction among
those libs from Novell and Watcom, I think. Do you have any ideas on it?
Thanks.
Regards,
-Mike
"Guenter" <devforums@novell.com> wrote in message
news:rfN_i.308$AA3.222@kovat.provo.novell.com...
> Hi Michael,
> "Michael Chen" <mchen@tannerycreeksystems.com> wrote in
news:yhE_i.5626
> $7U6.4774@kovat.provo.novell.com:
>
>> I am new to NLM programming world. I am trying to grub CPU information
by
>> 'netware_cpu_info' lib call, which is located inside libc, I think. My
>> problem is that I don't know how to link libc of novell within watcom
>> linker. I have downloaded and installed the NDK. Inside the lib folder
of
>> libc, there are some NLM files. Watcom linker said they were 'invalid
>> library file attribute'. Can anybody shed some light on me?
> you need to link with the imp files;
> here's a sample - edit the makefile and set the paths to the NDK and tools
> properly:
> http://www.gknw.net/development/samples/watcom/nwinfo.zip
>
> HTH, Günter.
>
|
| Post Reply
|
| Re: Watcom link issue on libc |
 |
Thu, 15 Nov 2007 23:22:53 GMT |
Hi Michael,
"Michael Chen" <mchen@tannerycreeksystems.com> wrote in
news:6A1%i.194$L42.104@kovat.provo.novell.com:
> Thanks for you instruction. After importing libc.imp in the lnk file(I
> am using GNU make), I got the link stage passed. The new issue
> introduced by importing libc.imp is that the printf function doesn't
> output to the console any more as it used to be. Maybe there is some
> kind of confliction among those libs from Novell and Watcom, I think. Do
> you have any ideas on it? Thanks.
this is intended behavior AFAIKT; the output of printf() goes now since NW6
to the logger screen, and without trickies you are no longer allowed to print
to the system console screen; you can however always open an own screen -
then the printf() output goes there - but attention: in opposite to CLIB the
LIBC screen doesnt keep open! You need to self take care of that, and insert
a pressanykey() call or similar when your NLM has finished, and you want to
see the output on the own screen.
For testing only you can also link this to your NLM:
http://www.gknw.net/development/mk_nlm/keepscreen.c
which avoids changing existing code - but another attention: the NetWare
loader stays blocked while the NLM is waiting for the key press ....
Günter.
|
| Post Reply
|
| Re: Watcom link issue on libc |
 |
Fri, 16 Nov 2007 13:15:17 GMT |
"Guenter" <devforums@novell.com> wrote in message
news:hx4%i.316$L42.309@kovat.provo.novell.com...
> Hi Michael,
> "Michael Chen" <mchen@tannerycreeksystems.com> wrote in
> news:6A1%i.194$L42.104@kovat.provo.novell.com:
>
>> Thanks for you instruction. After importing libc.imp in the lnk file(I
>> am using GNU make), I got the link stage passed. The new issue
>> introduced by importing libc.imp is that the printf function doesn't
>> output to the console any more as it used to be. Maybe there is some
>> kind of confliction among those libs from Novell and Watcom, I think.
Do
>> you have any ideas on it? Thanks.
> this is intended behavior AFAIKT; the output of printf() goes now since
> NW6
> to the logger screen, and without trickies you are no longer allowed to
> print
> to the system console screen; you can however always open an own screen -
> then the printf() output goes there - but attention: in opposite to CLIB
> the
> LIBC screen doesnt keep open! You need to self take care of that, and
> insert
> a pressanykey() call or similar when your NLM has finished, and you want
> to
> see the output on the own screen.
> For testing only you can also link this to your NLM:
> http://www.gknw.net/development/mk_nlm/keepscreen.c
> which avoids changing existing code - but another attention: the NetWare
> loader stays blocked while the NLM is waiting for the key press ....
>
> Günter.
>
I built and ran the sample file(keepscreen.c) for testing but had no luck --
nothing printed out yet. Even further, I have tried OutputToScreen on the
result of getscreenhandle, getconsolehandle, getnetwarelogger,
getnetwareconsole resepectively. They all printed nothing. I am wondering if
there are some steps missing or wrong in my practice. Any idea? Thanks.
-Mike
|
| Post Reply
|
|
|
|
|
|
|
|
|
|