www.digitalmars.com         C & C++   DMDScript  

c++.mfc - so close...

reply bw <bw_member pathlink.com> writes:
dang i'm a gnat's hair away from a succesful link... any way to keep the linker
from looking for this code?  i have a shell32.dll as part of windows os but i
don't have a linkable lib file for it... can i make a header with declarations
for these functions and #include it maybe?

compile line: sc -Jm -w -mN -DNDEBUG -WA -D__NT__
link options: /NOD /ONERROR:NOEXE
included libs: everything in dm\lib and nafxcw

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

shell32.lib
Warning 2: File Not Found shell32.lib
s:\mfc\lib\nafxcw.lib(appcore)
Error 42: Symbol Undefined _OpenPrinterA 12
s:\mfc\lib\nafxcw.lib(appcore)
Error 42: Symbol Undefined _DocumentPropertiesA 24
s:\mfc\lib\nafxcw.lib(appcore)
Error 42: Symbol Undefined _ClosePrinter 4
s:\mfc\lib\nafxcw.lib(winfrm)
Error 42: Symbol Undefined _DragQueryFileA 16
s:\mfc\lib\nafxcw.lib(winfrm)
Error 42: Symbol Undefined _DragFinish 4
s:\mfc\lib\nafxcw.lib(filecore)
Error 42: Symbol Undefined _SHGetFileInfoA 20
s:\mfc\lib\nafxcw.lib(docmgr)
Error 42: Symbol Undefined _ExtractIconA 12
OPTLINK : Warning 134: No Start Address
SMAKE fatal error: command "link" returned with error code 7
Stopping.
Sep 12 2002
next sibling parent reply user domain.invalid writes:
Implib.exe is your friend.
See also other message-threads about this.

bw wrote:
 dang i'm a gnat's hair away from a succesful link... any way to keep the linker
 from looking for this code?  i have a shell32.dll as part of windows os but i
 don't have a linkable lib file for it... can i make a header with declarations
 for these functions and #include it maybe?
 
 compile line: sc -Jm -w -mN -DNDEBUG -WA -D__NT__
 link options: /NOD /ONERROR:NOEXE
 included libs: everything in dm\lib and nafxcw
 
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 shell32.lib
 Warning 2: File Not Found shell32.lib
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _OpenPrinterA 12
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _DocumentPropertiesA 24
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _ClosePrinter 4
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragQueryFileA 16
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragFinish 4
 s:\mfc\lib\nafxcw.lib(filecore)
 Error 42: Symbol Undefined _SHGetFileInfoA 20
 s:\mfc\lib\nafxcw.lib(docmgr)
 Error 42: Symbol Undefined _ExtractIconA 12
 OPTLINK : Warning 134: No Start Address
 SMAKE fatal error: command "link" returned with error code 7
 Stopping.
 
 
Sep 13 2002
parent bw <bw_member pathlink.com> writes:
the shell32 line was an error in the makefile, must have been left over from
msvc... 

well i ran lib.exe on the nafxcw.lib and the list didn't show the offending
functions.  their names are in the file though, so i guess that's the problem?
i spent an hour or two trying to hack the right mfc\src\ files and the
winspool.h so that OpenPrinterA and those other function names won't end up in
the library.  rebuilt the nafxcw.lib with projects\nafxcw.mak and finally got a
link.  however still get the No Start Address Warning though... by that time rcc
problems popped up so i went to bed!!

i guess i can try to fool with implib but for now my head is hurting and i need
coffee!!  thanks again i'll stick with it...
bw

In article <als4dl$s27$1 digitaldaemon.com>, user domain.invalid says...
Implib.exe is your friend.
See also other message-threads about this.
 Error 42: Symbol Undefined _OpenPrinterA 12
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _DocumentPropertiesA 24
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _ClosePrinter 4
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragQueryFileA 16
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragFinish 4
 s:\mfc\lib\nafxcw.lib(filecore)
 Error 42: Symbol Undefined _SHGetFileInfoA 20
 s:\mfc\lib\nafxcw.lib(docmgr)
 Error 42: Symbol Undefined _ExtractIconA 12
 OPTLINK : Warning 134: No Start Address
 SMAKE fatal error: command "link" returned with error code 7
 Stopping.
 
 
Sep 13 2002
prev sibling parent reply "Walter" <walter digitalmars.com> writes:
Those are in winspool.lib

"bw" <bw_member pathlink.com> wrote in message
news:alre2p$1jt$1 digitaldaemon.com...
 dang i'm a gnat's hair away from a succesful link... any way to keep the
linker
 from looking for this code?  i have a shell32.dll as part of windows os
but i
 don't have a linkable lib file for it... can i make a header with
declarations
 for these functions and #include it maybe?

 compile line: sc -Jm -w -mN -DNDEBUG -WA -D__NT__
 link options: /NOD /ONERROR:NOEXE
 included libs: everything in dm\lib and nafxcw

 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 shell32.lib
 Warning 2: File Not Found shell32.lib
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _OpenPrinterA 12
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _DocumentPropertiesA 24
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _ClosePrinter 4
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragQueryFileA 16
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragFinish 4
 s:\mfc\lib\nafxcw.lib(filecore)
 Error 42: Symbol Undefined _SHGetFileInfoA 20
 s:\mfc\lib\nafxcw.lib(docmgr)
 Error 42: Symbol Undefined _ExtractIconA 12
 OPTLINK : Warning 134: No Start Address
 SMAKE fatal error: command "link" returned with error code 7
 Stopping.
Sep 13 2002
parent bw <bw_member pathlink.com> writes:
i think i oughta do the implib thing on winspool.drv and add it to the link
maybe that'll work... it looks like a dll inside even though it's a drv
extension.  thanks walter!

C:\>where winspool.lib
No matching files found.
C:\>where winspool.*
C:\WINDOWS\SYSTEM\WINSPOOL.DRV


In article <alsviu$1u8b$1 digitaldaemon.com>, Walter says...
Those are in winspool.lib
<snip>
 Warning 2: File Not Found shell32.lib
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _OpenPrinterA 12
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _DocumentPropertiesA 24
 s:\mfc\lib\nafxcw.lib(appcore)
 Error 42: Symbol Undefined _ClosePrinter 4
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragQueryFileA 16
 s:\mfc\lib\nafxcw.lib(winfrm)
 Error 42: Symbol Undefined _DragFinish 4
 s:\mfc\lib\nafxcw.lib(filecore)
 Error 42: Symbol Undefined _SHGetFileInfoA 20
 s:\mfc\lib\nafxcw.lib(docmgr)
 Error 42: Symbol Undefined _ExtractIconA 12
 OPTLINK : Warning 134: No Start Address
 SMAKE fatal error: command "link" returned with error code 7
 Stopping.
Sep 13 2002