Using LINKER Switches From Within VBDOS.EXE Environment

ID: Q93027


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for MS-DOS, version 1.0


SUMMARY

It is usually possible to set LINK options by using the LINK environment variable. However, this technique cannot be used within the VBDOS.EXE programming environment.

To work around this limitation, create a new .EXE file called LINK.EXE which SHELLs to the old LINK.EXE file, and invokes the old LINK.EXE file (which has been renamed) with whatever options you would like to use.

The following steps show how to perform this type of functionality. In the following example, the "/r" LINK option is used, and the old LINK.EXE file is renamed to LINKER.EXE.

  1. Start VBDOS.EXE.


  2. From the File menu select New Form... (FORM1.FRM).


  3. Add the following code:
    
         PRINT "Running link in real mode."
         SHELL "linker /r "+command$
         END 


  4. From the File menu select Save File.


  5. Type LINKR.BAS as your file name, and choose OK.


  6. From the File menu select exit, to exit out of the environment.


  7. From the MS-DOS prompt, type the following commands:
    BC /o linkr;
    LINK /r linkr;
    RENAME link.exe linker.exe
    RENAME linkr.exe link.exe


You should now be able to LINK from within the VBDOS.EXE programming environment with whatever LINK options you have specified.

Additional query words: VBmsdos 1.00

Keywords :
Version : MS-DOS:1.0
Platform : MS-DOS
Issue type :


Last Reviewed: December 10, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.