Thread View: alt.lang.basic
5 messages
5 total messages
Started by Bob T. Stango
Thu, 23 Jul 1992 19:45
Link problems with QuickBASIC 4.5
Author: Bob T. Stango
Date: Thu, 23 Jul 1992 19:45
Date: Thu, 23 Jul 1992 19:45
17 lines
1300 bytes
1300 bytes
OK PROGRAMMERS. Here is my situation. Using QuickBASIC 4.5. I have one main program and three sub programs. I want to link the three sub programs to the main program and then compile them into one large .exe file. Using lib to make a library with the three object files seems to work ok. After linking the .lib file with the main program and creating an .exe file, it then chokes trying to do one of the sub functions. I think all variables are defined properly. Am I going about this wrong? Any help apreciated. Bob Stango ========================---------------------=========================== Bob Stango Internet :bstango@phoenix.Princeton.EDU Princeton University CIT Bitnet :bstango@pucc.Princeton.EDU ****************** MY THOUGHTS AND OPINIONS ARE MY OWN *****************
Re: Link problems with QuickBASIC 4.5
Author: Unrecoverable Application Error
Date: Fri, 24 Jul 1992 15:23
Date: Fri, 24 Jul 1992 15:23
32 lines
2327 bytes
2327 bytes
In article <1992Jul23.194513.14047@Princeton.EDU> bstango@phoenix.Princeton.EDU
(Bob T. Stango) writes:
+
+OK PROGRAMMERS. Here is my situation. Using QuickBASIC 4.5. I have one
+main program and three sub programs. I want to link the three sub
+programs to the main program and then compile them into one large .exe
+file. Using lib to make a library with the three object files seems to
+work ok. After linking the .lib file with the main program and creating
+an .exe file, it then chokes trying to do one of the sub functions. I
+think all variables are defined properly. Am I going about this wrong?
+Any help apreciated.
+
+Bob Stango
+========================---------------------===========================
Two possibilities occur to me quickly...
1- load you main module with the other two configured for inclusion
via the $INCLUDE metacommand. See your manual or on-line help for the details
on that. From there you should be able to compile all together.
2- you may have just a little bit of sloppy programming. This happened
to me once and the way I got around it was to re-think my approach to the
problem at hand and essentially re-write the module using better coding
practices. Even the best of us get sloppy so I'm not at all surprised to have
problems. I usually format most of my code as it hits the keyboard and debug
as I go. Risky as hell but it works for me!
Keith.
--
D.K.Higgs DATA+@osu.edu a.k.a dhiggs@magnus.acs.ohio-state.edu _____ __o
Ohio State University Libraries, Acquisitions Department ----- -\<,
Continuation Acquisition Division ----- ( )/ ( )
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\_________/~~~~~~~~~~~~~~~~~~~
Re: Link problems with QuickBASIC 4.5
Author: Tom Boutell
Date: Fri, 24 Jul 1992 15:42
Date: Fri, 24 Jul 1992 15:42
34 lines
1929 bytes
1929 bytes
In article <1992Jul23.194513.14047@Princeton.EDU> bstango@phoenix.Princeton.EDU (Bob T. Stango) writes: > >OK PROGRAMMERS. Here is my situation. Using QuickBASIC 4.5. I have one >main program and three sub programs. I'm a bit uncertain about what you mean here. Do you mean one main program and three actual SUBs, or one program and three separate *modules* with their own global variables and multiple SUBs, FUNCTIONs, et cetera? I want to link the three sub >programs to the main program and then compile them into one large .exe >file. Using lib to make a library with the three object files seems to >work ok. After linking the .lib file with the main program and creating >an .exe file, it then chokes trying to do one of the sub functions. I >think all variables are defined properly. Am I going about this wrong? >Any help apreciated. Well, if all you want is to be able to use SUBs, they can go in the same file with your main program. But I would assume you know this. You can build your program in the environment, probably. Is there a reason why you're doing this from the command line? Give me more information on what exactly you're doing, and I can probably help you out of the woods. Either of the things I think you might have meant (grin) are doable, but I need to know which and to have some idea what sort of syntax you're using so far. -- My return address now works! Believe it or not there is life after college. At least if you live near NYC.
Re: Link problems with QuickBASIC 4.5
Author: howard neuwirth-hirsch
Date: Fri, 24 Jul 1992 22:05
Date: Fri, 24 Jul 1992 22:05
21 lines
1167 bytes
1167 bytes
In article <1992Jul23.194513.14047@Princeton.EDU>, bstango@phoenix.Princeton.EDU (Bob T. Stango) writes: > > I want to link the three sub > programs to the main program and then compile them into one large .exe > file. [...] After linking the .lib file with the main program and creating > an .exe file, it then chokes trying to do one of the sub functions. I > think all variables are defined properly. > > Bob Stango One suggestion: be sure you have declared the modules in your main program. Build the three subprograms into a quick library and you can test this all out in the quick environment. It will tell you quickly if you are missing the declarations. H. -- Howard Neuwirth-Hirsch neuwirth@ficc.ferranti.com
Re: Link problems with QuickBASIC 4.5
Author: Phillip Cooper
Date: Mon, 27 Jul 1992 17:53
Date: Mon, 27 Jul 1992 17:53
29 lines
1850 bytes
1850 bytes
In article <1992Jul24.152317.28957@magnus.acs.ohio-state.edu> dhiggs@magnus.acs.ohio-state.edu (Unrecoverable Application Error) writes: >In article <1992Jul23.194513.14047@Princeton.EDU> bstango@phoenix.Princeton.EDU > (Bob T. Stango) writes: >+ >+OK PROGRAMMERS. Here is my situation. Using QuickBASIC 4.5. I have one >+main program and three sub programs. I want to link the three sub >+programs to the main program and then compile them into one large .exe >+file. Using lib to make a library with the three object files seems to >+work ok. After linking the .lib file with the main program and creating >+an .exe file, it then chokes trying to do one of the sub functions. I >+think all variables are defined properly. Am I going about this wrong? >+Any help apreciated. >+ >+Bob Stango >+========================---------------------=========================== >Two possibilities occur to me quickly... > 1- load you main module with the other two configured for inclusion >via the $INCLUDE metacommand. See your manual or on-line help for the details >on that. From there you should be able to compile all together. > You should never, ever, ever use the include statement to bring in executable code. This should be reserved for typedefs, declares, static variable declarations, defint's etc. Bringing in executable code can lead to nightmarish debugging problems. Phil Cooper > 2- <deleted>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads