Subject: Re: OemToCharBuffA etc.
From: [email-masked] (Fernandes, Hilton)

17 Nov 1997 19:40:07 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: Multipart/Mixed; boundary=Message-Boundary-7082
To: Thomas Nichols <[email-masked]>, [email-masked]
Cc: "Fernandes, Hilton" <[email-masked]>

--Message-Boundary-7082
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

On 17 Nov 97 at 0:36, Thomas Nichols <[email-masked]> 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 
<[email-masked]>, 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
[email-masked]
http://www.geocities.com/SiliconValley/Lakes/5657
URLs and help on C++ programming and Object-Oriented Design

--Message-Boundary-7082
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'list.sh'

#! sh

for f in *.a; do
echo $f
nm $f > /tmp/$f
grep -l $1 /tmp/$f >> /tmp/list.txt
done

--Message-Boundary-7082--
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".