From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d29f6e75ff166264 X-Google-Attributes: gid103376,public From: labtek@cs.yale.edu (Tom Griest) Subject: Re: GNAT and Windows95: help needed. Date: 1996/06/03 Message-ID: <4ovn55INNhhh@RA.DEPT.CS.YALE.EDU>#1/1 X-Deja-AN: 158293167 distribution: World references: <4ov0cc$mkv@epimetheus.algonet.se> organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 cc: wengelin@algonet.se newsgroups: comp.lang.ada Date: 1996-06-03T00:00:00+00:00 List-Id: wengelin@algonet.se (Daniel Wengelin) writes: > >Hello, having found a "departemental PC" running Win95 at work, >I decided to have a go at getting GNAT to work. I obtained the >GNAT301A and installed it. It worked just fine, but as far as I >could tell could only use text-based IO in a DOS-window. > >Hence,I obtained to sets of files, one being the Win32Ada >bindings to Win32 from LabTek. The other set of files is >what was called Win32Lib. What is "win32lib"? >Now the problem starts. > >Compiling is fine, but the linking phase seems to go astray, >with either undefined symbols or the same symbols in more than >one instance. > >Here I will need some guidance. > >1) There are ".LIB"-files in two several places. > What are .LIB-files? How do they relate to object files? > If .LIB-files are "bundles of object files", how do I > tell what symbols are defined by one? .lib files (and .a files) are library/archives, or as you say, "bundles of object files". The MS documentation describes which library to use for each function. (This documentation is available in our CD-based Software Development Kits) >2) How do I know whether there is SDK installed? What IS SDK? SDK = Software Development Kit. Look in the registry (regedit) under hkey_current_user/software/microsoft to see if any SDK's are installed. >3) Supposing that I should be using the GNU linker "ld", how > do I tell it where to look for object symbols? I tried the > winlib.ld file, and it definitely seems to make a BIG > difference. What files does ld look in to tell what > object and library files it needs? Indeed, 'ld' does use the various '.ld' files as linker scripts. This is defined by the options you select and controlled by the "specs" file in the gnu_ld subdirectory under the gnat directory. Note that 'ld' is order sensitive, and therefore you must place dependencies before the files that resolve those dependencies. >4) Supposing that the ".ld" files are what "ld" looks for, how do > I now what ".LIB" and ".obj"-files should be present. There is > a definite overlap between the GNAT installation and the files > in the Win32Lib. There is even multiple occurences of several > symbols WITHIN the Win32Lib. I can't answer without knowing what Win32Lib is. Is it possible you are referring to win32ada.lib? >5) Supposing that I get the Win32Ada sample programs to work, > what do I need to do to enable me to choose whether the > application should be linked for a DOS-window text IO or a > Win32 proper window? Is the switch "-mwindows" sufficient? It is necessary, but obviously a "windows" application is quite a bit different from a console application. For example, Text_IO will not work as expected in a Windows application. -Tom