first time using lib.exe. Its about some object assembly here (with masm32 package); I have those three files monkcode.asm and main.asm. in I declare a structure.

ControlID  DWORD 1
Top        DWORD 10
Left       DWORD 10
Caption    DWORD ?
Wdth      DWORD 100
Height     DWORD 25
OnClick    DWORD ?
ClsName    db "Button",0
Handle     DWORD ?
Owner      DWORD ?     
Create     DWORD CreateButton
in monkcode.asm I have a proc called CreateButton and declare it public and include with other neccesery *.inc's. After assembly (sounds like cooking) at Qeditor , lib it at Dos prompt like this: lib monkcode.obj at main.asm I include and declare

extrn CreateButton:proc

NewButton CBUTTON {3,10,10,offset szCaption,160}
when I build it the Link.exe says: unresolved external symbol: _CreateButton All this works code works fine when i have them in asm files instead of lib. Sorry for such a long message but I've tried all different ways to find the way out before writing this thanks
Posted on 2001-03-04 16:36:00 by Confusius
OK, lemmy first state how I go about this: I'll make a.asm and has everything in it I wish the "external world" to know about a.asm. Thus, any exported variables will get an EXTERNDEF there, and every exported function a PROTO. Inside a.asm, I'll include, that matches PROTO's with procs, and EXTERNDEF's with declarations. Any private procs inside a.asm will get their PROTO's inside a.asm. I've never had to do anything else special to export a proc besides declare it PUBLIC. When I build a.asm, I'll do it like so:

\masm32\bin\ml /nologo /c /coff a.asm
\masm32\bin\lib *.obj /out:a.lib
This makes me a nice library object for later use. Now, in the main.asm, I'll include, and includelib a.lib. Then just build it like always. Sorry, I'm not seeing what you're having trouble with, unless it's that you are not includelib the monkcode.lib. (I don't know if you can like like this from multiple .obj's; I know libs work, so I build libs)
Posted on 2001-03-04 17:57:00 by Ernie