undefined struct '_PangoContext'
- From: Himanshu Garg <himanshu garg gmail com>
- To: gtk-list gnome org
- Subject: undefined struct '_PangoContext'
- Date: Sat, 18 Jun 2005 15:59:24 +0530
Hi,
I have written a small program to show text on the Windows
desktop. Here it is:-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include <windows.h> // for GetDC and HDC
#include <pango/pangowin32.h> // for PangoContext etc.
int main(int argc, char* argv[])
{
PangoContext aPangoContext = pango_win32_get_context();
PangoLayout aPangoLayout = pango_layout_new(aPangoContext);
HDC aHDC = GetDC(NULL);
pango_layout_set_markup(aPangoLayout, "<span
font_family=\"Pothana2000\">쁖</span>", -1);
int anX = 25, aY = 25;
pango_win32_render_layout(aHDC, aPangoLayout, anX, aY);
return(0);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I think I have included all the lib files in lib and include in
include but I still get the following errors:-
--------------------Configuration: pango3 - Win32 Debug--------------------
Compiling...
pango3.cpp
c:\gnome\include\pango\pangowin32.h(33) : warning C4005: 'STRICT' :
macro redefinition
c:\program files\microsoft visual
studio\vc98\include\windef.h(15) : see previous definition of 'STRICT'
D:\squeak\pango3\pango3.cpp(41) : error C2079: 'aPangoContext' uses
undefined struct '_PangoContext'
D:\squeak\pango3\pango3.cpp(41) : error C2440: 'initializing' : cannot
convert from 'struct _PangoContext *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
D:\squeak\pango3\pango3.cpp(42) : error C2079: 'aPangoLayout' uses
undefined struct '_PangoLayout'
D:\squeak\pango3\pango3.cpp(42) : error C2664: 'pango_layout_new' :
cannot convert parameter 1 from 'int' to 'struct _PangoContext *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
D:\squeak\pango3\pango3.cpp(44) : error C2664:
'pango_layout_set_markup' : cannot convert parameter 1 from 'int' to
'struct _PangoLayout *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
D:\squeak\pango3\pango3.cpp(46) : error C2664:
'pango_win32_render_layout' : cannot convert parameter 2 from 'int' to
'struct _PangoLayout *'
Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
pango3.exe - 6 error(s), 1 warning(s)
//////////////////////////////////////////////////////////////////////////////////////
As you know I am on MS Windows compiling using Visual Studio
6.0. pkg-config didn't work either.
I look forward to responses from you.
Thank You,
Himanshu.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]