www.digitalmars.com         C & C++   DMDScript  

c++.command-line - beginner's question

reply bob whitehouse <bob_member pathlink.com> writes:
I am new to command lines. I can get a simple program to compile using

dmc -c programName

But the link fails with 

unrecognised symbol _GetStockObject 4

From my reading of the manual, the likely cause is a missing library. But I have
only just downloaded the package, and something as basic as GetStockObject being
missing sounds unlikely to me. 

Looking at the header files, I noticed this in wtypes.h

#include <win32\scdefs.h>
#include <win32\wtypes.h>

Which leads me to wonder whether I am missing a folder called win32 that ought
to be in my dm\lib\ folder.

Or perhaps it's something much simpler and this question is moronic. As I say, I
am new to command line stuff.

Any ideas out there?

Bob Whitehouse
Sep 18 2003
parent reply Cesar Rabak <csrabak uol.com.br> writes:
bob whitehouse escreveu:
 I am new to command lines. I can get a simple program to compile using
 
 dmc -c programName
 
 But the link fails with 
 
 unrecognised symbol _GetStockObject 4
 
 From my reading of the manual, the likely cause is a missing library. But I
have
 only just downloaded the package, and something as basic as GetStockObject
being
 missing sounds unlikely to me. 
 
 Looking at the header files, I noticed this in wtypes.h
 
 #include <win32\scdefs.h>
 #include <win32\wtypes.h>
 
 Which leads me to wonder whether I am missing a folder called win32 that ought
 to be in my dm\lib\ folder.
The (import) library that defines this symbol is gde32.lib, which comes in the standard package (at least dm836c.zip). The include file which pertains to theis symbol is wingdi.h, but normally you should not care of including it, as windows.h does it for you. HTH -- Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/
Sep 18 2003
parent bob whitehouse <bob_member pathlink.com> writes:
In article <3F69ECED.4020803 uol.com.br>, Cesar Rabak says...
bob whitehouse escreveu:
 I am new to command lines. I can get a simple program to compile using
 
 dmc -c programName
 
 But the link fails with 
 
 unrecognised symbol _GetStockObject 4
 
 From my reading of the manual, the likely cause is a missing library. But I
have
 only just downloaded the package, and something as basic as GetStockObject
being
 missing sounds unlikely to me. 
 
 Looking at the header files, I noticed this in wtypes.h
 
 #include <win32\scdefs.h>
 #include <win32\wtypes.h>
 
 Which leads me to wonder whether I am missing a folder called win32 that ought
 to be in my dm\lib\ folder.
The (import) library that defines this symbol is gde32.lib, which comes in the standard package (at least dm836c.zip). The include file which pertains to theis symbol is wingdi.h, but normally you should not care of including it, as windows.h does it for you. HTH -- Cesar Rabak GNU/Linux User 52247. Get counted: http://counter.li.org/
Bob Whitehouse Ex Mac programmer new to Windows
Sep 18 2003