From: hfernandes AT geocities DOT com (Fernandes, Hilton) Subject: Re: OemToCharBuffA etc. 17 Nov 1997 19:40:07 -0800 Message-ID: <199711180022.QAA28273.cygnus.gnu-win32@geocities.com> References: <3 DOT 0 DOT 2 DOT 32 DOT 19971117003658 DOT 0069a3b4 AT messagebox DOT com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary=Message-Boundary-7082 To: Thomas Nichols , gnu-win32 AT cygnus DOT com Cc: "Fernandes, Hilton" --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 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 , 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 AT geocities DOT com 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".