This is the mail archive of the
mailing list for the Cygwin project.
dlltool and def files with dots and aliasing
- From: Kerem Bulbul <bulbul at sabanciuniv dot edu>
- To: cygwin at cygwin dot com
- Date: Tue, 11 Dec 2007 11:56:51 +0200
- Subject: dlltool and def files with dots and aliasing
I am trying to build an import library from a windows dll for which I do
not have the source code. I am new to cygwin and programming on windows,
and I understand that there are two main steps to this:
1. Extract a def file from the dll
2. Use dlltool to create the import library
The method described in the cygwin documentation
echo EXPORTS > cplex110.def
nm cplex110.dll | grep ' T _' | sed 's/.* T _//' >> foo.def
does not work in this case. I get "nm: cplex110.dll: no symbols"
So, I tried
pexports cplex110.dll | sed 's/^_//' > cplex110.def
as described at
However, when run on this file, dlltool craps out with syntax errors. I
was not sure what was going on, and finally I got my hands onto
to get more info from the dll. There seem to be two issues:
1. pexports does not yield a correct def file when aliasing is used in
2. dlltool does not like dots in the exported symbol names.
Ultimately, I think I have the following problem. Output of dumpbin:
ordinal hint RVA name
119 76 00129808 CPXaddrows
120 77 CPXaddrows. (forwarded to _CPXaddrows.@48)
659 293 00129814 _CPXaddrows.@48
660 294 00129808 _CPXaddrows@48
As far as I understand, the def file should contain the following:
Run on this file,
dlltool -d cplex110.def --dllname cplex110.lib -l libcplex.a -k
breaks with a syntax error at the first line that contains a dot. This
syntax error is independent from the aliasing:
does also break. When I remove all lines with a dot from the def file,
dlltool works, and my program builds fine because it only calls
CPXaddrows. Then, it yields a run time error after CPXaddrows is called.
Does anyone have an idea about how to fix this.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html