implib - what it produces?

jcc7 technocrat7 at gmail.com
Tue Nov 21 11:38:34 PST 2006


== Quote from Thorn (th at inbox.ru)'s article
> Hello, guys!
> I program on D and start using DDBI. I've compiled library but I
> cannot link my test project: it complains about missing functions (I
> linked with odbc32.lib - very old library from digitalmars).
> After this I tried to create my own import library thru "implib
> \windows\system32\odbc32.dll", but I've got strange library -
> instead of smth like "_DBConnect at 20" implib broduces clear names
> like "DBConnect". Of course linker couldn't find functions. :(
> Please, may be somebody can explain what a benefit to use implib and
> second: how to link my ODBC programs?
> Thanks!

I like to use implib like this:
 implib odbc32.lib odbc32.def
(where I provide a .def file)

The trick, of course, would be to find a .def file.

There are some available in the binding project at dsource, such as:
http://www.dsource.org/projects/bindings/browser/trunk/def/odbc32.def

But that might not have all of the definitions. You could also try using linkdef:
http://www.dprogramming.com/linkdef.php

Finally, I've attached a .def file that has many more definitions than the one in
the bindings project. I expect it'll will work for you, but I can't test it for
you (obviously).

I think that Walter has made a tool available that helps with turning a .dll into
a DMD-compatible .lib, but I don't recall the details.

(This is a common topic, so I guess someone should write a wiki page about it.
Maybe I'll do that eventually.)
begin 644 odbc32.def
M3$E"4D%262!/1$)#,S(-"D1%4T-225!424].("=O9&)C,S(N9&QL)PT*15A%
M5%E012!.5`T*#0I%6%!/4E13#0H@("!?1V5T3T1"0U-H87)E9$1A=&%`,"`]
M($=E=$]$0D-3:&%R961$871A#0H@("!?4&]S=$]$0D-#;VUP;VYE;G1%<G)O
M<D`T(#T at 4&]S=$]$0D-#;VUP;VYE;G1%<G)O<@T*("`@7U!O<W1/1$)#17)R
M;W)`,38@/2!0;W-T3T1"0T5R<F]R#0H@("!?3T1"0U-E=%1R>5=A:71686QU
M94`T(#T at 3T1"0U-E=%1R>5=A:71686QU90T*("`@7T]$0D-'9714<GE786ET
M5F%L=65`,"`]($]$0D-'9714<GE786ET5F%L=64-"B`@(%]0;W-T0V]M<&]N
M96YT17)R;W)`-"`](%!O<W1#;VUP;VYE;G1%<G)O<@T*("`@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%N8V5L#0H@("!?4U%,0V]L071T
M<FEB=71E<T`R."`](%-13$-O;$%T=')I8G5T97,-"B`@(%]344Q#;VQ!='1R
M:6)U=&5S5T`R."`](%-13$-O;$%T=')I8G5T97-7#0H@("!?4U%,0V]L071T
M<FEB=71E<T%`,C@@/2!344Q#;VQ!='1R:6)U=&5S00T*("`@7U-13$-O;FYE
M8W1`,C@@/2!344Q#;VYN96-T#0H@("!?4U%,0V]N;F5C=%=`,C@@/2!344Q#
M;VYN96-T5PT*("`@7U-13$-O;FYE8W1!0#(X(#T at 4U%,0V]N;F5C=$$-"B`@
M(%]344Q$97-C<FEB94-O;$`S-B`](%-13$1E<V-R:6)E0V]L#0H@("!?4U%,
M1&5S8W)I8F5#;VQ70#,V(#T at 4U%,1&5S8W)I8F5#;VQ7#0H@("!?4U%,1&5S
M8W)I8F5#;VQ!0#,V(#T at 4U%,1&5S8W)I8F5#;VQ!#0H@("!?4U%,1&ES8V]N
M;F5C=$`T(#T at 4U%,1&ES8V]N;F5C=`T*("`@7U-13$5R<F]R0#,R(#T at 4U%,
M17)R;W(-"B`@(%]344Q%<G)O<E=`,S(@/2!344Q%<G)O<E<-"B`@(%]344Q%
M<G)O<D%`,S(@/2!344Q%<G)O<D$-"B`@(%]344Q%>&5C1&ER96-T0#$R(#T@
M4U%,17AE8T1I<F5C=`T*("`@7U-13$5X96-$:7)E8W170#$R(#T at 4U%,17AE
M8T1I<F5C=%<-"B`@(%]344Q%>&5C1&ER96-T04`Q,B`](%-13$5X96-$:7)E
M8W1!#0H@("!?4U%,17AE8W5T94`T(#T at 4U%,17AE8W5T90T*("`@7U-13$9E
M=&-H0#0@/2!344Q&971C:`T*("`@7U-13$9R965#;VYN96-T0#0@/2!344Q&
M<F5E0V]N;F5C=`T*("`@7U-13$9R965%;G9`-"`](%-13$9R965%;G8-"B`@
M(%]344Q&<F5E4W1M=$`X(#T at 4U%,1G)E95-T;70-"B`@(%]344Q'971#=7)S
M;W).86UE0#$V(#T at 4U%,1V5T0W5R<V]R3F%M90T*("`@7U-13$=E=$-U<G-O
M<DYA;6570#$V(#T at 4U%,1V5T0W5R<V]R3F%M95<-"B`@(%]344Q'971#=7)S
M;W).86UE04`Q-B`](%-13$=E=$-U<G-O<DYA;65!#0H@("!?4U%,3G5M4F5S
M=6QT0V]L<T`X(#T at 4U%,3G5M4F5S=6QT0V]L<PT*("`@7U-13%!R97!A<F5`
M,3(@/2!344Q0<F5P87)E#0H@("!?4U%,4')E<&%R95=`,3(@/2!344Q0<F5P
M87)E5PT*("`@7U-13%!R97!A<F5!0#$R(#T at 4U%,4')E<&%R94$-"B`@(%]3
M44Q2;W=#;W5N=$`X(#T at 4U%,4F]W0V]U;G0-"B`@(%]344Q3971#=7)S;W).
M86UE0#$R(#T at 4U%,4V5T0W5R<V]R3F%M90T*("`@7U-13%-E=$-U<G-O<DYA
M;6570#$R(#T at 4U%,4V5T0W5R<V]R3F%M95<-"B`@(%]344Q3971#=7)S;W).
M86UE04`Q,B`](%-13%-E=$-U<G-O<DYA;65!#0H@("!?4U%,4V5T4&%R86U`
M,S(@/2!344Q3971087)A;0T*("`@7U-13%1R86YS86-T0#$R(#T at 4U%,5')A
M;G-A8W0-"B`@(%]344Q#;VQU;6YS0#,V(#T at 4U%,0V]L=6UN<PT*("`@7U-1
M3$-O;'5M;G-70#,V(#T at 4U%,0V]L=6UN<U<-"B`@(%]344Q#;VQU;6YS04`S
M-B`](%-13$-O;'5M;G-!#0H@("!?4U%,1')I=F5R0V]N;F5C=$`S,B`](%-1
M3$1R:79E<D-O;FYE8W0-"B`@(%]344Q$<FEV97)#;VYN96-T5T`S,B`](%-1
M3$1R:79E<D-O;FYE8W17#0H@("!?4U%,1')I=F5R0V]N;F5C=$%`,S(@/2!3
M44Q$<FEV97)#;VYN96-T00T*("`@7U-13$=E=$-O;FYE8W1/<'1I;VY`,3(@
M/2!344Q'971#;VYN96-T3W!T:6]N#0H@("!?4U%,1V5T0V]N;F5C=$]P=&EO
M;E=`,3(@/2!344Q'971#;VYN96-T3W!T:6]N5PT*("`@7U-13$=E=$-O;FYE
M8W1/<'1I;VY!0#$R(#T at 4U%,1V5T0V]N;F5C=$]P=&EO;D$-"B`@(%]344Q'
M971$871A0#(T(#T at 4U%,1V5T1&%T80T*("`@7U-13$=E=$9U;F-T:6]N<T`Q
M,B`](%-13$=E=$9U;F-T:6]N<PT*("`@7U-13$=E=$EN9F]`,C`@/2!344Q'
M971);F9O#0H@("!?4U%,1V5T26YF;U=`,C`@/2!344Q'971);F9O5PT*("`@
M7U-13$=E=$EN9F]!0#(P(#T at 4U%,1V5T26YF;T$-"B`@(%]344Q'9713=&UT
M3W!T:6]N0#$R(#T at 4U%,1V5T4W1M=$]P=&EO;@T*("`@7U-13$=E=%1Y<&5)
M;F9O0#@@/2!344Q'9714>7!E26YF;PT*("`@7U-13$=E=%1Y<&5);F9O5T`X
M(#T at 4U%,1V5T5'EP94EN9F]7#0H@("!?4U%,1V5T5'EP94EN9F]!0#@@/2!3
M44Q'9714>7!E26YF;T$-"B`@(%]344Q087)A;41A=&%`."`](%-13%!A<F%M
M1&%T80T*("`@7U-13%!U=$1A=&%`,3(@/2!344Q0=71$871A#0H@("!?4U%,
M4V5T0V]N;F5C=$]P=&EO;D`Q,B`](%-13%-E=$-O;FYE8W1/<'1I;VX-"B`@
M(%]344Q3971#;VYN96-T3W!T:6]N5T`Q,B`](%-13%-E=$-O;FYE8W1/<'1I
M;VY7#0H@("!?4U%,4V5T0V]N;F5C=$]P=&EO;D%`,3(@/2!344Q3971#;VYN
M96-T3W!T:6]N00T*("`@7U-13%-E=%-T;71/<'1I;VY`,3(@/2!344Q39713
M=&UT3W!T:6]N#0H@("!?4U%,4W!E8VEA;$-O;'5M;G-`-#`@/2!344Q3<&5C
M:6%L0V]L=6UN<PT*("`@7U-13%-P96-I86Q#;VQU;6YS5T`T,"`](%-13%-P
M96-I86Q#;VQU;6YS5PT*("`@7U-13%-P96-I86Q#;VQU;6YS04`T,"`](%-1
M3%-P96-I86Q#;VQU;6YS00T*("`@7U-13%-T871I<W1I8W-`,S8@/2!344Q3
M=&%T:7-T:6-S#0H@("!?4U%,4W1A=&ES=&EC<U=`,S8@/2!344Q3=&%T:7-T
M:6-S5PT*("`@7U-13%-T871I<W1I8W-!0#,V(#T at 4U%,4W1A=&ES=&EC<T$-
M"B`@(%]344Q486)L97-`,S8@/2!344Q486)L97,-"B`@(%]344Q486)L97-7
M0#,V(#T at 4U%,5&%B;&5S5PT*("`@7U-13%1A8FQE<T%`,S8@/2!344Q486)L
M97-!#0H@("!?4U%,0G)O=W-E0V]N;F5C=$`R-"`](%-13$)R;W=S94-O;FYE
M8W0-"B`@(%]344Q"<F]W<V5#;VYN96-T5T`R-"`](%-13$)R;W=S94-O;FYE
M8W17#0H@("!?4U%,0G)O=W-E0V]N;F5C=$%`,C0@/2!344Q"<F]W<V5#;VYN
M96-T00T*("`@7U-13$-O;'5M;E!R:79I;&5G97-`,S8@/2!344Q#;VQU;6Y0
M<FEV:6QE9V5S#0H@("!?4U%,0V]L=6UN4')I=FEL96=E<U=`,S8@/2!344Q#
M;VQU;6Y0<FEV:6QE9V5S5PT*("`@7U-13$-O;'5M;E!R:79I;&5G97-!0#,V
M(#T at 4U%,0V]L=6UN4')I=FEL96=E<T$-"B`@(%]344Q$871A4V]U<F-E<T`S
M,B`](%-13$1A=&%3;W5R8V5S#0H@("!?4U%,1&%T85-O=7)C97-70#,R(#T@
M4U%,1&%T85-O=7)C97-7#0H@("!?4U%,1&%T85-O=7)C97-!0#,R(#T at 4U%,
M1&%T85-O=7)C97-!#0H@("!?4U%,1&5S8W)I8F5087)A;4`R-"`](%-13$1E
M<V-R:6)E4&%R86T-"B`@(%]344Q%>'1E;F1E9$9E=&-H0#(P(#T at 4U%,17AT
M96YD961&971C:`T*("`@7U-13$9O<F5I9VY+97ES0#4R(#T at 4U%,1F]R96EG
M;DME>7,-"B`@(%]344Q&;W)E:6=N2V5Y<U=`-3(@/2!344Q&;W)E:6=N2V5Y
M<U<-"B`@(%]344Q&;W)E:6=N2V5Y<T%`-3(@/2!344Q&;W)E:6=N2V5Y<T$-
M"B`@(%]344Q-;W)E4F5S=6QT<T`T(#T at 4U%,36]R95)E<W5L=',-"B`@(%]3
M44Q.871I=F53<6Q`,C0@/2!344Q.871I=F53<6P-"B`@(%]344Q.871I=F53
M<6Q70#(T(#T at 4U%,3F%T:79E4W%L5PT*("`@7U-13$YA=&EV95-Q;$%`,C0@
M/2!344Q.871I=F53<6Q!#0H@("!?4U%,3G5M4&%R86US0#@@/2!344Q.=6U0
M87)A;7,-"B`@(%]344Q087)A;4]P=&EO;G-`,3(@/2!344Q087)A;4]P=&EO
M;G,-"B`@(%]344Q0<FEM87)Y2V5Y<T`R."`](%-13%!R:6UA<GE+97ES#0H@
M("!?4U%,4')I;6%R>4ME>7-70#(X(#T at 4U%,4')I;6%R>4ME>7-7#0H@("!?
M4U%,4')I;6%R>4ME>7-!0#(X(#T at 4U%,4')I;6%R>4ME>7-!#0H@("!?4U%,
M4')O8V5D=7)E0V]L=6UN<T`S-B`](%-13%!R;V-E9'5R94-O;'5M;G,-"B`@
M(%]344Q0<F]C961U<F5#;VQU;6YS5T`S-B`](%-13%!R;V-E9'5R94-O;'5M
M;G-7#0H@("!?4U%,4')O8V5D=7)E0V]L=6UN<T%`,S8@/2!344Q0<F]C961U
M<F5#;VQU;6YS00T*("`@7U-13%!R;V-E9'5R97-`,C@@/2!344Q0<F]C961U
M<F5S#0H@("!?4U%,4')O8V5D=7)E<U=`,C@@/2!344Q0<F]C961U<F5S5PT*
M("`@7U-13%!R;V-E9'5R97-!0#(X(#T at 4U%,4')O8V5D=7)E<T$-"B`@(%]3
M44Q39710;W-`,38@/2!344Q39710;W,-"B`@(%]344Q397138W)O;&Q/<'1I
M;VYS0#$V(#T at 4U%,4V5T4V-R;VQL3W!T:6]N<PT*("`@7U-13%1A8FQE4')I
M=FEL96=E<T`R."`](%-13%1A8FQE4')I=FEL96=E<PT*("`@7U-13%1A8FQE
M4')I=FEL96=E<U=`,C@@/2!344Q486)L95!R:79I;&5G97-7#0H@("!?4U%,
M5&%B;&50<FEV:6QE9V5S04`R."`](%-13%1A8FQE4')I=FEL96=E<T$-"B`@
M(%]344Q$<FEV97)S0#,R(#T at 4U%,1')I=F5R<PT*("`@7U-13$1R:79E<G-7
M0#,R(#T at 4U%,1')I=F5R<U<-"B`@(%]344Q$<FEV97)S04`S,B`](%-13$1R
M:79E<G-!#0H@("!?4U%,0FEN9%!A<F%M971E<D`T,"`](%-13$)I;F1087)A
M;65T97(-"B`@(%]344Q!;&QO8TAA;F1L94`Q,B`](%-13$%L;&]C2&%N9&QE
M#0H@("!?4U%,0FEN9%!A<F%M0#,R(#T at 4U%,0FEN9%!A<F%M#0H@("!?4U%,
M0VQO<V5#=7)S;W)`-"`](%-13$-L;W-E0W5R<V]R#0H@("!?4U%,0V]L071T
M<FEB=71E0#(X(#T at 4U%,0V]L071T<FEB=71E#0H@("!?4U%,0V]L071T<FEB
M=71E5T`R."`](%-13$-O;$%T=')I8G5T95<-"B`@(%]344Q#;VQ!='1R:6)U
M=&5!0#(X(#T at 4U%,0V]L071T<FEB=71E00T*("`@7U-13$-O<'E$97-C0#@@
M/2!344Q#;W!Y1&5S8PT*("`@7U-13$5N9%1R86Y`,3(@/2!344Q%;F14<F%N
M#0H@("!?4U%,1F5T8VA38W)O;&Q`,3(@/2!344Q&971C:%-C<F]L;`T*("`@
M7U-13$9R965(86YD;&5`."`](%-13$9R965(86YD;&4-"B`@(%]344Q'971#
M;VYN96-T071T<D`R,"`](%-13$=E=$-O;FYE8W1!='1R#0H@("!?4U%,1V5T
M0V]N;F5C=$%T=')70#(P(#T at 4U%,1V5T0V]N;F5C=$%T=')7#0H@("!?4U%,
M1V5T0V]N;F5C=$%T=')!0#(P(#T at 4U%,1V5T0V]N;F5C=$%T=')!#0H@("!?
M4U%,1V5T1&5S8T9I96QD0#(T(#T at 4U%,1V5T1&5S8T9I96QD#0H@("!?4U%,
M1V5T1&5S8T9I96QD5T`R-"`](%-13$=E=$1E<V-&:65L9%<-"B`@(%]344Q'
M971$97-C1FEE;&1!0#(T(#T at 4U%,1V5T1&5S8T9I96QD00T*("`@7U-13$=E
M=$1E<V-296-`-#0@/2!344Q'971$97-C4F5C#0H@("!?4U%,1V5T1&5S8U)E
M8U=`-#0@/2!344Q'971$97-C4F5C5PT*("`@7U-13$=E=$1E<V-296-!0#0T
M(#T at 4U%,1V5T1&5S8U)E8T$-"B`@(%]344Q'971$:6%G1FEE;&1`,C@@/2!3
M44Q'971$:6%G1FEE;&0-"B`@(%]344Q'971$:6%G1FEE;&170#(X(#T at 4U%,
M1V5T1&EA9T9I96QD5PT*("`@7U-13$=E=$1I86=&:65L9$%`,C@@/2!344Q'
M971$:6%G1FEE;&1!#0H@("!?4U%,1V5T1&EA9U)E8T`S,B`](%-13$=E=$1I
M86=296,-"B`@(%]344Q'971$:6%G4F5C5T`S,B`](%-13$=E=$1I86=296-7
M#0H@("!?4U%,1V5T1&EA9U)E8T%`,S(@/2!344Q'971$:6%G4F5C00T*("`@
M7U-13$=E=$5N=D%T=')`,C`@/2!344Q'971%;G9!='1R#0H@("!?4U%,1V5T
M4W1M=$%T=')`,C`@/2!344Q'9713=&UT071T<@T*("`@7U-13$=E=%-T;71!
M='1R5T`R,"`](%-13$=E=%-T;71!='1R5PT*("`@7U-13$=E=%-T;71!='1R
M04`R,"`](%-13$=E=%-T;71!='1R00T*("`@7U-13%-E=$-O;FYE8W1!='1R
M0#$V(#T at 4U%,4V5T0V]N;F5C=$%T='(-"B`@(%]344Q3971#;VYN96-T071T
M<E=`,38@/2!344Q3971#;VYN96-T071T<E<-"B`@(%]344Q3971#;VYN96-T
M071T<D%`,38@/2!344Q3971#;VYN96-T071T<D$-"B`@(%]344Q3971$97-C
M1FEE;&1`,C`@/2!344Q3971$97-C1FEE;&0-"B`@(%]344Q3971$97-C1FEE
M;&170#(P(#T at 4U%,4V5T1&5S8T9I96QD5PT*("`@7U-13%-E=$1E<V-&:65L
M9$%`,C`@/2!344Q3971$97-C1FEE;&1!#0H@("!?4U%,4V5T1&5S8U)E8T`T
M,"`](%-13%-E=$1E<V-296,-"B`@(%]344Q3971%;G9!='1R0#$V(#T at 4U%,
M4V5T16YV071T<@T*("`@7U-13%-E=%-T;71!='1R0#$V(#T at 4U%,4V5T4W1M
M=$%T='(-"B`@(%]344Q39713=&UT071T<E=`,38@/2!344Q39713=&UT071T
M<E<-"B`@(%]344Q39713=&UT071T<D%`,38@/2!344Q39713=&UT071T<D$-
M"B`@(%]344Q!;&QO8TAA;F1L95-T9$`Q,B`](%-13$%L;&]C2&%N9&QE4W1D
M#0H@("!?4U%,0G5L:T]P97)A=&EO;G-`."`](%-13$)U;&M/<&5R871I;VYS
M#0H@("!?9U]H2&5A<$UA;&QO8R!?9U]H2&5A<$UA;&QO8R!$051!(#T at 9U]H
M2&5A<$UA;&QO8R!?9U]H2&5A<$UA;&QO8R!$051!#0H@("!?37!(96%P1&5S
M=')O>2`]($UP2&5A<$1E<W1R;WD-"B`@(%]-<$AE87!686QI9&%T92`]($UP
M2&5A<%9A;&ED871E#0H@("!?37!(96%P0V]M<&%C="`]($UP2&5A<$-O;7!A
M8W0-"B`@(%]-<$AE87!3:7IE(#T at 37!(96%P4VEZ90T*("`@7TUP2&5A<%)E
M06QL;V,@/2!-<$AE87!294%L;&]C#0H@("!?37!(96%P0W)E871E(#T at 37!(
M96%P0W)E871E#0H@("!?37!(96%P06QL;V,@/2!-<$AE87!!;&QO8PT*("`@
:7TUP2&5A<$9R964@/2!-<$AE87!&<F5E#0H`
`
end



More information about the Digitalmars-d mailing list