DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Linking .obj files

  1. #1
    Bob Guest

    Linking .obj files


    I notice that link.exe outputs some interesting switches when it executes
    without command line parameters. Is there any way to capture .obj files
    as they are produced by the compiler and later relink them with link.exe?
    Thanks in advance.

  2. #2
    Willy Van den Driessche Guest

    Re: Linking .obj files

    You can manually invoke the C2.EXE and LINK.EXE applications. The easiest
    way to know their command switches (I know of) is to create a simple
    application A.EXE that displays the commandline parameters (command$).
    Rename the existing C2.EXE and LINK.EXE files and put your A.EXE in their
    place (copy it twice and rename to C2.EXE and LINK.EXE respectively). If
    you now invoke a compile from VB, you will see what parameters are passed to
    these applications. You can then generate .obj files from a batch file.
    There is a big but. Although these .obj files are very much like compiled C
    files, VB does more for you than a typical C compiler does. In the latter
    scenario you typically use a makefile to generate .obj files only when they
    are needed, i.e. if one of their dependents changes. I don't know of a way
    to automatically generate that information for VB files. Also I'm not sure
    if VB doesn't generate more information for you (the embedded typelibrary
    for activeX stuff comes to mind)
    However, having access to the link process allows you to link in other code.
    I'm not sure about this last thing but I remember there was an article
    called "Control the compiler"(?) in the former Visual Basic Programmers
    Journal.
    --
    Van den Driessche Willy
    For a work in progress :
    http://users.skynet.be/wvdd2/index.html



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center