Results 1 to 3 of 3

Thread: VB6 IDE Linker AddIn

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2012
    Posts
    1,639

    VB6 IDE Linker AddIn

    The initial concept and core of this add-in was developed by 'The Trick'. (VB6-Trick-Advanced-Tools)

    I needed a stripped-down version of this to just intercept the linking events. Thus other features, also those who causes problems on compiling in some projects ('Global Checking' section, to remove integer overflow checks etc.), are not contained.

    By using this linking events you can place a file location which will be shell executed (e.g. batch file).
    Reasons for such need are for example to replaces .obj files with Cobj files in order to statically link an C library into the Std-EXE or Ax-DLL.
    The batch file to replace .obj with .cobj file could look like this:
    Code:
    del xyz.obj
    copy xyz.cobj xyz.obj
    Real life example is the sqlite3win32 project from 'VBForumsCommunity' to Staticly compile sqlite3 into a VB6 project.

    This add-in will write to the [VBCompiler] section of an .vbp file:
    Code:
    [VBCompiler]
    LinkSwitches=KERNEL32.LIB /OPT:NOREF /OPT:NOWIN98
    LinkBefore=replace_cobj.bat
    However, it detects and preserves in case there is a [TAT] section available from the Trick Advanced Tools to maintain compatibility. In case it is detected a checkbox will appear, giving the opportunity to preserve or break compatibility with the Trick Advanced Tools.
    Name:  VB6IDELinkerAddInPic.jpg
Views: 1480
Size:  23.2 KB
    Attached Files Attached Files
    Last edited by Krool; Sep 16th, 2018 at 12:14 PM.

  2. #2
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    999

    Re: VB6 IDE Linker AddIn

    I get a message
    LINK : fatal error LNK1181: cannot open input file "KERNEL32.LIB"
    I found the KERNEL32.LIB so I put this
    C:\Program Files (x86)\Windows Kits\10\Lib\10.0.18362.0\um\arm64\KERNEL32.LIB /OPT:NOREF /OPT:NOWIN98
    In the addin, but I get another error:
    ...........Incremental Linker Version 6.00.8447
    .............
    LINK : fatal error LNK1181: cannot open input file "C:\Program.obj"

    In replace_cobj.bat there are two statements for copy, but the files *.cobj not exist (there not in the zip file)
    I use Windows 10 64bit
    Any Idea

  3. #3
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    999

    Re: VB6 IDE Linker AddIn

    I get the files from git, and finally i have a bin file with the 3 files:
    sqlite3win32.dll
    sqlite3win32helper.cobj
    sqlite3win32stubs.cobj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width