Visual D 0.3.26 released

Derek derekbrowncmu at gmail.com
Thu Apr 10 23:25:16 PDT 2014


On Friday, 11 April 2014 at 05:14:56 UTC, Derek wrote:
> On Friday, 11 April 2014 at 04:55:58 UTC, evilrat wrote:
>> if they are templates try make them plain function
> They're not, they're just ordinary functions:
>
> // Links.
> uint MAKELONG(ushort a, ushort b) {
> 	return cast(uint) ((b << 16) | a);
> }
>
> // Does not link.
> uint MAKELONG(uint a, uint b) {
>     assert((a & 0xFFFF0000) == 0);
>     assert((b & 0xFFFF0000) == 0);
>     return MAKELONG(cast(ushort)a, cast(ushort)b);
> }
>
> // Does not link.
> ushort LOWORD(ulong l) {
> 	return cast(ushort) l;
> }
>
> // Does not link.
> ushort HIWORD(ulong l) {
> 	return cast(ushort) (l >>> 16);
> }
>
>
> I grepped to see if MAKELONG was defined somewhere else as 
> well, but it's not.

I've found another I believe related example. The constant 
RICHEDIT_CLASS in richedit.d. Trying to use it gives the linking 
error:

Error	1	Error 42: Symbol Undefined 
_D5win328richedit14RICHEDIT_CLASSxAa (const(char[]) 
win32.richedit.RICHEDIT_CLASS)	C:\Users\Derek\Documents\Visual 
Studio 2012\Projects\WindowsApp1\WindowsApp1\	

It is defined in richedit.d as:

version(Unicode) {
	const wchar[] RICHEDIT_CLASS = "RichEdit20W";
} else {
	const char[] RICHEDIT_CLASS  = "RichEdit20A";
}

(And FTR my project is compiling in ANSI mode)


More information about the Digitalmars-d-ide mailing list