CompuServe Thread

#Linking Gadtools.library

6 messages in this thread
#28857From: Michael FiggOct 6, 1992 7:53 PM
I'm having problem with BLINK finding 'gadtools.library' in the RKM Libs gadtools example on Pg. 383 (Simplegtgadget.c). I don't see the library in LIBS: but assume it is in the ROM (or would be if I had a ROM) since xoper shows it is there. How do I get BLINK to find it? Is this, heaven forbid, a mistake in the RKM. Thanks, Mike Figg
#28902From: Jim Nangano/SYSOPOct 7, 1992 11:06 AM
Michael, 'gadtools.library' is indeed in ROM (for systems with 2.04 and above). It is not a "link-time" library, so BLink doesn't need to find it. Like most of the Amiga operating system libraries, it's a "run-time" library. Your program gains access to it by using the OpenLibrary() call to get the pointer to the library base, and then the library's functions are available relative to that base. Are you sure you are using the needed #include files in your C program? – BobR (Motorola Inside!)
#28921From: Michael FiggOct 7, 1992 8:33 PM
I'll double check the included #include files again for about the 3rd time but the program is right out of the RKM, as is the compile and link commands for SAC/C 5.10a, and I'm using 5.10b. It looks like it should work. Thanks anyway, I'll keep staring at it. Mike Figg
#28995From: Michael FiggOct 8, 1992 9:20 PM
It turns out that the problem was the link statement in the RKM asked for LIB:amiga.lib, while actually it wanted LIB:amiga2.0.lib. It works fine now. A typo in the RKM's, can you believe that? Mike Figg,
#29041From: Jim Nangano/SYSOPOct 9, 1992 11:54 AM
Michael, Ahh, that makes sense. What you got "caught" by is the fact that the compiler vendor shipped both 1.3 and 2.0 versions of "amiga.lib", and _they_ named the latter one to "amiga2.0.lib" because they were supplying both versions. The RKM is "correct", though. Commodore only supplies a single library called "amiga.lib". What I've done on my system is to only use the 2.0 #include and library files, and no longer retain the 1.3 versions. I don't need them, and it's just more clutter. I still can write programs that will run under 1.3, as long as I don't use any of the system functions that are documented as being "new" to V36 and above (i.e., new to 2.0 and above releases of the operating system). Of course, on my system, "amiga2.0.lib" became "amiga.lib" a long time ago. – BobR (Motorola Inside!)
#29080From: Kelly JordanOct 10, 1992 7:34 AM
Michael, That's not a typo in the RKM. It is because you have your SAS/C 5.10b system set up for 1.3 instead of 2.0 that you had to link with amiga2.0.lib. If you had the compiler set up for 2.0 only, then amiga.lib would have been the 2.0 version. SAS/C eliminated this problem with release 6.0 by not inlcuding 1.3 stuff at all. The 2.0 stuff (includes, amiga.lib, etc) will work perfectly for 1.3 systems as long as you do not use 2.0 features. 73, Kelly