Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TEA on Windows

80 views
Skip to first unread message

kw

unread,
Sep 12, 2015, 11:03:59 AM9/12/15
to
I'm trying to port a TEA extension to Windows via mingw 64 bit without success.

I'm having two problems.

1. Configure does not append dll to the binary output. It complains that it cannot build dynamic libs.

2. If I hack the makefile, I can get a build started, but I get a ton of errors about missing bits (hard to copy and paste from cmd).

Can someone give the package a try and suggest what I am doing wrong? It is at http://fossil.codebykevin.com. Pull the tk-components repo, and build the customfont package.

I am using latest mingw-64 on Win7.

Thanks,
Kevin

Kevin Walzer

unread,
Sep 12, 2015, 6:26:53 PM9/12/15
to
On 9/12/15 11:03 AM, kw wrote:

>
> 2. If I hack the makefile, I can get a build started, but I get a ton of errors about missing bits (hard to copy and paste from cmd).
>

Here's a better example of the error messages from a hacked makefile:

/usr/include/w32api/msxml.h:3145:76: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT (WINAPI *addChild)(IXMLElement *This,IXMLElement
*pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3145:88: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT (WINAPI *addChild)(IXMLElement *This,IXMLElement
*pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3188:63: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT WINAPI IXMLElement_get_type_Proxy(IXMLElement *This,LONG
*plType);
^
/usr/include/w32api/msxml.h:3194:87: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT WINAPI IXMLElement_addChild_Proxy(IXMLElement
*This,IXMLElement *pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3194:99: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT WINAPI IXMLElement_addChild_Proxy(IXMLElement
*This,IXMLElement *pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3228:112: error: unknown type name 'DISPID'
HRESULT (WINAPI *GetIDsOfNames)(IXMLElement2 *This,REFIID
riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);

^
/usr/include/w32api/msxml.h:3229:51: error: unknown type name 'DISPID'
HRESULT (WINAPI *Invoke)(IXMLElement2 *This,DISPID
dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS
*pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
^
/usr/include/w32api/msxml.h:3237:53: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT (WINAPI *get_type)(IXMLElement2 *This,LONG *plType);
^
/usr/include/w32api/msxml.h:3240:78: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT (WINAPI *addChild)(IXMLElement2 *This,IXMLElement2
*pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3240:90: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT (WINAPI *addChild)(IXMLElement2 *This,IXMLElement2
*pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3285:65: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT WINAPI IXMLElement2_get_type_Proxy(IXMLElement2 *This,LONG
*plType);
^
/usr/include/w32api/msxml.h:3291:90: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT WINAPI IXMLElement2_addChild_Proxy(IXMLElement2
*This,IXMLElement2 *pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3291:102: error: expected declaration
specifiers or '...' before 'LONG'
HRESULT WINAPI IXMLElement2_addChild_Proxy(IXMLElement2
*This,IXMLElement2 *pChildElem,LONG lIndex,LONG lReserved);

^
/usr/include/w32api/msxml.h:3316:113: error: unknown type name 'DISPID'
HRESULT (WINAPI *GetIDsOfNames)(IXMLAttribute *This,REFIID
riid,LPOLESTR *rgszNames,UINT cNames,LCID lcid,DISPID *rgDispId);

^
/usr/include/w32api/msxml.h:3317:52: error: unknown type name 'DISPID'
HRESULT (WINAPI *Invoke)(IXMLAttribute *This,DISPID
dispIdMember,REFIID riid,LCID lcid,WORD wFlags,DISPPARAMS
*pDispParams,VARIANT *pVarResult,EXCEPINFO *pExcepInfo,UINT *puArgErr);
^
In file included from /usr/include/w32api/objbase.h:163:0,
from /usr/include/w32api/ole2.h:17,
from /usr/include/w32api/wtypes.h:12,
from /usr/include/w32api/winscard.h:10,
from /usr/include/w32api/windows.h:97,
from ./win/customfont_win.c:15:
/usr/include/w32api/urlmon.h:1052:9: error: expected declaration
specifiers or '...' before 'LONG'
LONG nPriority);
^
/usr/include/w32api/urlmon.h:1056:9: error: expected declaration
specifiers or '...' before 'LONG'
LONG *pnPriority);
^
/usr/include/w32api/urlmon.h:1142:5: error: expected declaration
specifiers or '...' before 'LONG'
LONG nPriority);
^
/usr/include/w32api/urlmon.h:1150:5: error: expected declaration
specifiers or '...' before 'LONG'
LONG *pnPriority);
^
/usr/include/w32api/urlmon.h:1295:5: error: expected
specifier-qualifier-list before 'LONG'
LONG lindex;
^
/usr/include/w32api/urlmon.h:1466:9: error: expected declaration
specifiers or '...' before 'LONG'
LONG *pnPriority);
^
/usr/include/w32api/urlmon.h:1574:5: error: expected declaration
specifiers or '...' before 'LONG'
LONG *pnPriority);
^
/usr/include/w32api/urlmon.h:1742:9: error: expected declaration
specifiers or '...' before 'LONG'
LONG *pnPriority);
^
/usr/include/w32api/urlmon.h:6870:9: error: expected declaration
specifiers or '...' before 'LONG'
LONG nPriority);
^
--Kevin



--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

s.effe...@googlemail.com

unread,
Sep 14, 2015, 5:21:55 AM9/14/15
to
Not a real help but a preliminary analysis:

What could be wrong with LONG? (Note: DISPID is typedef'd to LONG, so that's not a separate error.)

The following error line:
expected declaration specifiers or '...' before 'LONG'

The compiler complains about 'LONG', so LONG cannot be a define, otherwise the compiler would complain about what LONG expands to.

I cannot think of a valid typedef that explodes upon usage in this case. Well, this could still mean that I need a good cup of tea to think about one. I remember that MinGW64 had some problems with the internal __int64 some years ago, perhaps there is a "typedef __int64 LONG;" and again some problem with __int64?

The most likely circumstance where you get this type of error is if LONG is declared as a function (and you compile with a C compiler, not C++):

void LONG(void);
void somefunc(LONG x); // this line will cause the described error


As I said, just some brainstorming without resolving your problem. MinGW32 can compile your file, it must be specific to MinGW64.

-- Stephan

Kevin Walzer

unread,
Sep 14, 2015, 7:39:04 AM9/14/15
to
On 9/14/15 5:21 AM, s.effe...@googlemail.com wrote:
> As I said, just some brainstorming without resolving your problem. MinGW32 can compile your file, it must be specific to MinGW64.

Turns out to be a bad installation of MinGW for all those errors.
Upgrading to gcc 5 with a different MinGW package addresses those issues.

It turns out I don't need all the TEA machinery; the package was also
starting to barf on the Mac also but I found a different way to install
fonts without compiling a lib. (Set an app config key. Yay Mac. Wish
Windows had something similar for the registry.)

In the chat, apn told me that twapi could do this without any
difficulty...so I'll be reporting back on that later today.

Kevin Walzer

unread,
Sep 14, 2015, 8:01:13 PM9/14/15
to
On 9/14/15 7:39 AM, Kevin Walzer wrote:
> In the chat, apn told me that twapi could do this without any
> difficulty...so I'll be reporting back on that later today.

Turns out it's this easy with twapi:

package require twapi
twapi::AddFontResourceEx /path/to/iconic_stroke.ttf
label .b -text \u2699 -font {Iconic 22}
pack .b

A label with a font icon (cog) displays nicely.

Thanks to Ashok P. Nadkarni for the awesome Twapi package! This is
immediately in my indispensible toolbox.

Kevin
0 new messages