This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: OemToCharBuffA etc.
- To: Thomas Nichols <thomas dot nichols at mail dot com>, gnu-win32 at cygnus dot com
- Subject: Re: OemToCharBuffA etc.
- From: "Fernandes, Hilton" <hfernandes at geocities dot com>
- Date: Mon, 17 Nov 1997 22:23:22 +0000
- CC: "Fernandes, Hilton" <hgfernan at usp dot br>
- References: <19971116034646.1580.qmail@hotmail.com>
On 17 Nov 97 at 0:36, Thomas Nichols <thomas.nichols@mail.com> wrote:
> All these I've previously searched, but I can't find any ref to
> OemToCharBuffA and the others - Scott Christley's gnu-win32 API headers
> include protos for them, but ld reports it can't find them in the
> libraries, and
> grep OemTo *.a
> in C:\gnuwin32\b18\H-i386-cygwin32\i386-cygwin32\lib
> finds no matches (though it finds plenty for MessageBox, for example).
>
> Any suggestions on rsolving this?
>
Hi, Thomas!
I used the tiny shell script attached to find out that OemToCharBuffA is in
libuser32.a.
The other missing functions are there too.
So, the problem isn't in the libraries. I could not find anything very
theoretical about your problem. Neither in previous cygwin32 emails, nor in
my Unix manuals at work. Should print the ld manuals?
So I can only guess. From what i've experienced and what i read in this email
list, i guess the problem lies in two possible causes:
1) the argument order of the libraries,
2) the repeated linking of the same library.
Concerning 1), instead of your
> gcc -o test.exe test.c -luser32 -DPLATFORM=ON_WIN32 -L. -lxbstat
i would write:
gcc -c test.c -DPLATFORM=ON_WIN32
gcc test.o -o test.exe -luser32 -L. -lxbstat
(I'm a little afraid of those very terse command lines :-)
If that doesn't work i would start playing with the argument order. First
"-lxbstat" would go right after test.exe etc.
Caveat: the only reference to argument linking order i could find in my
personal archive of gnuwin32 mailing list, is a message from Chris Kirgios
<ckirgios@ajboggs.com>, sent in Thu, 4 Sep 1997 17:50:49 -0400, where comments
that at least for ORACLE Pro*C/C++ Libraries on NT, the cygwin libraries should
be linked first.
Concerning 2), there was a while ago an explanation by Colin Peters of the
problems you have when you link twice to the same (dynamic link) library.
Please keep us informed about what you find!
Regards,
++Hilton
----
Hilton Fernandes
hfernandes@geocities.com
http://www.geocities.com/SiliconValley/Lakes/5657
URLs and help on C++ programming and Object-Oriented Design
#! sh
for f in *.a; do
echo $f
nm $f > /tmp/$f
grep -l $1 /tmp/$f >> /tmp/list.txt
done