hi all
i have this problem w/ every console that uses masm32.inc & masm32.lib help me out plz
--------------------------------------------------------------------------
hello.obj : error LNK2001: unresolved external symbol _CoGetMalloc@8
hello.obj : error LNK2001: unresolved external symbol _CoTaskMemFree@4
---------------------------------------------------------------------------
thc
Posted on 2002-03-28 04:17:37 by k0d
I think it's a good bet that it's a linker problem :)

Why not give us your sample code and we'll have something to go on...



; #########################################################################

.386
.model flat, stdcall
option casemap :none ; case sensitive

; #########################################################################

include \masm32\include\windows.inc

include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib

Main PROTO

; #########################################################################

.data
Msg db "Hello World",0
buffer db 100 DUP (0)
;#########################################################################


.code

start:
invoke Main
invoke ExitProcess,0

; #########################################################################

Main proc

invoke StrLen,ADDR Msg
invoke dw2a,eax,ADDR buffer
invoke StdOut,addr buffer
invoke StdOut,ADDR Msg

ret

Main endp

; #########################################################################

end start
Posted on 2002-03-28 04:25:45 by Sliver
definitely not the linker when i add ole32.lib it compiles but giving these warnings
--------------------------------
LINK : warning LNK4089: all references to 'USER32.dll' discarded by /OPT:REF
LINK : warning LNK4089: all references to 'ole32.dll' discarded by /OPT:REF
---------------------------------

.486
.model flat, stdcall
option casemap :none


; ---------------------------------------------------------
; Prototypes
; ---------------------------------------------------------
Main proto :DWORD



; ---------------------------------------------------------
; Include files
; ---------------------------------------------------------
include \masm32\include\windows.inc

include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc

includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\ole32.lib ;<-- it works w/ this w/o it doesn't

; ---------------------------------------------------------
; Initialized data
; ---------------------------------------------------------
.data
HelloText db "Hello world!",13,10,0

; ---------------------------------------------------------
; Uninitialized data
; ---------------------------------------------------------
.data?
hInstance DWORD ?

; ---------------------------------------------------------
; Executable code
; ---------------------------------------------------------
.code
Start:
invoke GetModuleHandle, NULL
mov hInstance, eax
invoke Main, hInstance
invoke ExitProcess, eax


Main proc hInst:DWORD
invoke StdOut, ADDR HelloText
xor eax, eax
ret
Main endp

end Start
Posted on 2002-03-28 06:08:01 by k0d
same with your code too it works only if i add ole32.lib then i get this warning
LINK : warning LNK4089: all references to 'ole32.dll' discarded by /OPT:REF
Posted on 2002-03-28 06:41:20 by k0d