From: colin AT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters) Subject: RE: Removing @N's added to symbol names 6 Oct 1998 13:57:35 -0700 Message-ID: <00e301bdf0fd$fe3f5f00$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: "Adam Chlipala" Cc: "GNU-win32" Adam Chlipala wrote: >Is there any way that I can get gcc to not add @ to the end >of symbol names? A DLL that I am using functions from does not have >this addition but CygWin32 gcc insists on adding it. Do I have to make >an object file converter or what? I suspect what is happening is that the functions you are using are prototyped as STDCALL (or WINAPI) in a header file somewhere, but exported from the DLL with only the plain function name. The way to deal with this situation is to rebuild the import library using the -k option for dlltool (to [k]ill the @nn at the end of the function name imported). Internally the function will still have the @, which is expected for stdcall functions, but the import in the library will load it using the plain name. On the other hand, if the error occurs when you are linking with the import library (with an unresolved external) and not at run time (with some message about not being able to find exported function blah in library blah.dll) then it may be that the .def file used to build the import library does not contain the @ for the function names as it has to, or the functions are actually not stdcall even though they are being prototyped as such. I would suspect the former because it can happen if you automatically generate the ..def file from the exports of the DLL. The solution here is to use the -k option *and* add the @nn given for each function you use in the error messages from the linker to the .def file before rebuilding the import library. Good luck, Colin. - Colin Peters - colin at fu.is.saga-u.ac.jp - http://www.geocities.com/Tokyo/Towers/6162/index.html - Go not to usenet for counsel, for it will say both - 'yes' and 'no' and 'try another newsgroup'. - 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".