The MASM Forum

General => The Campus => Topic started by: BugCatcher on January 12, 2017, 04:17:05 AM

Title: debbuging custom libraries?
Post by: BugCatcher on January 12, 2017, 04:17:05 AM
I've been fooling around with Siekmanski's Stars dirextx 9 example. It seems that the lib file D3DMATHSSE2.LIB is a custom lib. When I try to build the project using debug, I get a unknown linker error. I'm by no means a pro at this stuff
but is there a linker trick to get the linker to recognize custom libraries?
Title: Re: debbuging custom libraries?
Post by: hutch-- on January 12, 2017, 11:10:57 AM
Its a bit hard to help you with no code to evaluate. Show us how you have included the lib that Siekmanski has written and we can probably help you.
Title: Re: debbuging custom libraries?
Post by: Siekmanski on January 13, 2017, 10:09:46 PM
Maybe the includes are in the wrong order...
Include the standard headers first, see below.

    include    windows.inc
    include    kernel32.inc
    includelib kernel32.lib
    include    user32.inc
    includelib user32.lib
    include    gdi32.inc
    includelib gdi32.lib
    include    ole32.inc
    includelib ole32.lib
    include    oleaut32.inc
    includelib oleaut32.lib

    include    includes\dx9macros.inc
    include    includes\d3d9.inc
    includelib libs\d3d9.lib

    include    includes\D3DTexture.Inc
    includelib libs\D3DTexture.lib
    include    includes\D3DMathSSE2.inc
    includelib libs\D3DMathSSE2.lib

Title: Re: debbuging custom libraries?
Post by: caraveiro on May 09, 2023, 05:54:40 AM
Error:

Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

LINK : fatal error LNK1104: cannot open file "includes\d3d9.lib"


Problem:
D3DTexture.lib -> "oleaut32.lib /DEFAULTLIB:includes\d3d9.lib"

Solution:
Just copy d3d9.lib in includes directory