Re: Rebuild with VisualAge C++

Jeff Freedman (jsf@hevanet.com)
Fri, 19 Jun 1998 16:07:44 -0700

Wolfgang Kaess wrote:
>
> I'm sure that I can build a backend using gcc !
> But I want to use VAC++.
>
> I can build a LIB frome the files in the "sanei" directory and I can build
> a frontend but I don't understand how I could compile/link a backend to my
> exe.

Sorry if I'm a little vague, but I haven't been doing much in OS/2
lately. I imagine that building a .DLL in VisualAge isn't all that
different than in EMX Gcc, in that you you give the linker a list of
object files and libraries to link together. I'm pretty sure that I
just included all the backend .obj's, and also had to include sanei.lib
and that other .lib of low-level utiltity functions. This is different
from the dynamically-loadable backends in the typical Linux build; it
might be possible to do this in OS/2, but I don't know how.

If you get "undefined external" errors, find the source files that those
symbols are in, and add those to the list of things to link into the
.dll.

Once you have that .dll, say "sane.dll", you need to use another tool
(which I'm sure VisualAge provides) to create an "import" library that
represents it, since OS/2 doesn't let you link directly with the .dll
like Linux does with shared libararies. This tool will create a
"sane.lib" file that you will use to link with, say, "scanimage.obj", to
produce the final "scanimage.exe".

Good luck!

-- Jeff

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com