[Xkeymacs-dev-en] problem building xkeymacs (GetString() is not a member of CString)

Back to archive index

Harold Bamford (bamforh) bamfo****@cisco*****
Tue Sep 13 08:54:42 JST 2011


Greetings,

 

I've been trying to set up my build environment for compiling Xkeymacs.
I have VS2010 Premium and it was giving me errors so I decided to start
with a fresh machine and use the VC2010 Express. 

 

For this test, I am using a new, clean, Windows 7 (64-bit) virtual
machine. I cloned xkeymacs using git:

 

git clone git://git.sourceforge.jp/gitroot/xkeymacs/xkeymacs.git

 

I downloaded and installed the 2010 Express. I then downloaded and
installed the SDK 7.1 and the DDK 7.1. Finally, I compiled the solution
and got this error:

 

     1>Utils.cpp(461): error C2039: 'GetString' : is not a member of
'CString'

                 C:\WinDDK\7600.16385.1\inc\mfc42\afx.h(385) : see
declaration of 'CString'

 

This is the error I was getting from my VS2010 Premium. Next, I
downloaded and installed SP1 for VS2010. I compiled again and got the
same error message.

 

So, it looks like there is a change missing from github. Can somebody
check if there are private changes in the WinDDK directory?

 

In Utils.cpp, starting at line 452, the function SetClipboardText()
calls text.GetString(). Unfortunately, this function is defined only for
Unicode.

 

BOOL CUtils::SetClipboardText(const CString& text)

{

      ...

      memcpy(pMem, text.GetString(), nLength);

      ...

}

 

In C:\WinDDK\7600.16385.1\inc\mfc42\afx.h, you can see the GetString()
stuff:

 

#if (_MFC_VER >= 0x0600) && defined(UNICODE)

 

public:

 

      PCTSTR GetString() const;

 

And again later on:

 

#if (_MFC_VER >= 0x0600) && defined(UNICODE)

 

inline PCTSTR CString::GetString() const

{

      return operator PCTSTR();

}

 

Looking at the Property Pages, you can see that UNICODE is not being
used:

 

 

 

So, can somebody help me here?

 

Thanks for your help.

 

-- Harold Bamford

 

-------------- next part --------------
An HTML attachment was scrubbed...
Télécharger 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 27799 bytes
Desc: image003.jpg
Url : http://lists.sourceforge.jp/mailman/archives/xkeymacs-dev-en/attachments/20110912/d7e525f1/attachment-0001.jpeg 



More information about the Xkeymacs-dev-en mailing list
Back to archive index