Re: Building a windows app with Tcl/Tk includes X.h



SimonG wrote:
I'm building a windows app with Tcl and Tk embedded. Visual Studio is
generating the following error:

c:\Tcl\include\X11\X.h(51) : error C2371: 'Font' : redefinition;
different basic types
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include
\comdef.h(305) : see declaration of 'Font'


It seems to me that it shouldn't be trying to include anything from
X11. Is there a #define I should pass to the compiler, or #include
more than just "tk.h" ? I'm using 8.4 with 8.5 overlayed (both from
ActiveState).

Thanks,

Simon Geard


Tk uses the header files for X11 in Win32 for its X emulation layer.
This can be problematic, as you seem to have found.

I'm not aware of a solution to your Font type problem. Most of the Tk
developers and ActiveState are using older compilers, for backwards
compatibility reasons.

Pat Thoyts may have some advice, and I'll point out this thread to him.
He seems to be the Win32 expert maintainer, and did a lot of work on
Tile/Ttk's Win32 support.


George
.



Relevant Pages

  • Re: Building a windows app with Tcl/Tk includes X.h
    ... different basic types ... Tk uses the header files for X11 in Win32 for its X emulation layer. ... I'm not aware of a solution to your Font type problem. ...
    (comp.lang.tcl)
  • Re: Progress while using MoveFile()
    ... it works 99% of the time on all all Win32 O/Ses. ... Delete the font file ... This folder must be on the same physical drive as the ... Windows\Fonts folder, or MoveFile will fail. ...
    (microsoft.public.win32.programmer.ui)
  • How to change default font for a win32 application.
    ... I want to change the default font for all controls (edit boxes, ... controls, buttons, dialogs etc) in a Win32 application. ... I could not find any Win32 API that will set the default font. ...
    (microsoft.public.win32.programmer.ui)
  • Re: CreateFont - create font of exact size / font mapper
    ... > size for the font to be applied on a text box. ... > CreateFont API in MSDN. ... a range of requested font heights are ... book is from the win32 perspective - I can only suggest you buy a copy.. ...
    (microsoft.public.win32.programmer.gdi)