unresolved external symbol "CWallet * pwalletMain"

when i don't define ENABLE_WALLET, it will link error( unresolved external symbol "class CWallet * pwalletMain" ). the error in files ( rpcdump.cpp and rpcwallet.cpp and signverifymessagedialog.cpp ). I can change signverifymessagedialog.cpp (only one quote), but lots of quote in rpcdump.cpp and rpcwallet.cpp, i don't have ablity to modify.