Re: GetFontUnicodeRanges() will not compile
- From: "Peter Olcott" <NoSpam@xxxxxxxxxxxxx>
- Date: Mon, 19 Nov 2007 19:37:27 -0600
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in
message news:qtu3k3dk6hnem679buolrrifld284l57f8@xxxxxxxxxx
You probably have the wrong platform SDK. Cutting and
pasting is usually considered a bad
idea, because it is supposed to work "out of the box".
For example, by cutting and
pasting, you caused the C++ compiler to think this was a
C++ method. You can tell this
instantly by looking at the name of the method; it has C++
name decoration on it. If it
were trying to link to the API and got an undefined
symbol, it would have said that the
symbol GetFontUnicodeRanges was undefined. Show the
declaration; it is almost certain you
did not copy it precisely as in the SDK. Or by the time
your copied-and-pasted definition
was seen, key macros required for correct compilation were
no longer defined.
If you ever find a definition in a header file and you get
an undefined symbol when trying
to use it, it means you have the wrong conditionals set.
joe
Everything finally works correctly, and it is all very
simple.
GetFontUnicodeRanges() reports the actual Unicode BMP code
points that the font defines. Thus the user of my system can
simply specify the Unicode BMP code points that they will
require, and I can produce these code points directly using
TextOutW().
#define _WIN32_WINNT 0X500
Although I did have to manually force this to be defined, (I
wonder why that was), now it all works correctly.
Thanks again for all your help.
On Mon, 19 Nov 2007 13:40:01 -0600, "Peter Olcott"
<NoSpam@xxxxxxxxxxxxx> wrote:
I am using MS Visual C++ 6.0 on a Windows XP Pro platform.Joseph M. Newcomer [MVP]
I forced the code to almost compile by cutting and pasting
the declarations from the wingdi.h include file. Now I am
getting this linker error:
--------------------Configuration: UnicodeTest - Win32
Debug--------------------
Linking...
UnicodeTestDlg.obj : error LNK2001: unresolved external
symbol "__declspec(dllimport) unsigned long __stdcall
GetFontUnicodeRanges(struct HDC__ *,struct tagGLYPHSET *)"
(__imp_?GetFontUnicodeRanges@@YGKPAUHDC__@@PAUtagGLYPHSET@@@Z)
Debug/UnicodeTest.exe : fatal error LNK1120: 1 unresolved
externals
Error executing link.exe.
UnicodeTest.exe - 2 error(s), 0 warning(s)
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in
message news:v3o3k35vutqof6uu5c763ligj3o6kj072d@xxxxxxxxxx
What are the various constants sent in your stdafx.h,
and
are you using a Win2K or higher
platform SDK?
joe
On Mon, 19 Nov 2007 11:08:17 -0600, "Peter Olcott"
<NoSpam@xxxxxxxxxxxxx> wrote:
LPGLYPHSET lpgs; // pointer to the glyph setJoseph M. Newcomer [MVP]
structure
::GetFontUnicodeRanges(this->GetDC(), lpgs); // HDC
hdc,
LPGLYPHSET lpgs
--------------------Configuration: UnicodeTest - Win32
Debug--------------------
Compiling...
UnicodeTestDlg.cpp
O:\cpp\DFA\UnicodeTest\UnicodeTestDlg.cpp(179) : error
C2065: 'LPGLYPHSET' : undeclared identifier
O:\cpp\DFA\UnicodeTest\UnicodeTestDlg.cpp(179) : error
C2146: syntax error : missing ';' before identifier
'lpgs'
O:\cpp\DFA\UnicodeTest\UnicodeTestDlg.cpp(179) : error
C2065: 'lpgs' : undeclared identifier
O:\cpp\DFA\UnicodeTest\UnicodeTestDlg.cpp(180) : error
C2039: 'GetFontUnicodeRanges' : is not a member of
'`global
namespace''
O:\cpp\DFA\UnicodeTest\UnicodeTestDlg.cpp(180) : error
C2065: 'GetFontUnicodeRanges' : undeclared identifier
Error executing cl.exe.
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: GetFontUnicodeRanges() will not compile
- From: Joseph M . Newcomer
- Re: GetFontUnicodeRanges() will not compile
- References:
- GetFontUnicodeRanges() will not compile
- From: Peter Olcott
- Re: GetFontUnicodeRanges() will not compile
- From: Joseph M . Newcomer
- Re: GetFontUnicodeRanges() will not compile
- From: Peter Olcott
- Re: GetFontUnicodeRanges() will not compile
- From: Joseph M . Newcomer
- GetFontUnicodeRanges() will not compile
- Prev by Date: Re: How to access I/O port directly in VC6.0?
- Next by Date: Re: Why INFINITE loop in a thread occupy so much CPU time??
- Previous by thread: Re: GetFontUnicodeRanges() will not compile
- Next by thread: Re: GetFontUnicodeRanges() will not compile
- Index(es):
Relevant Pages
|