30 6 月, 2007

S60 2nd FP2 for MIDP SC版的mma好像有问题

只要用了mma的api模拟器就会报jes-0-java-mma@的错误,开始时一直以为自己的操作或设置有问题,后来发现nokia forum上有人问到了类似的问题,但是没有人回答,于是才意识到有可能是模拟器本身的问题,结果去nokia上下了个s60 2.1 SC版,发现程序跑起来就没问题了。(PS:epoc的MIDP模拟器实在是太爽了,中文字体大小位置都和真机一模一样,可惜就是速度慢的像蜗牛)

C++ Builder 2007用gdiplus时的一个问题

加了Gdiplus.h后,编译不能通过,提示[C++ Error] GdiplusGraphics.h(37): E2015 Ambiguity between ‘Gdiplus::Graphics::Graphics(void *)’ and ‘Gdiplus::Graphics::Graphics(void *,int)’

这个是CodeGear提到的一个已知问题:

Must Turn off NO_STRICT #define with GdiPlus library

The C++ library GdiPlus cannot be used in non STRICT mode, since it requires that Graphics::Graphics(HDC) be distinguishable from Graphics::Graphics(HWND). In non STRICT mode, both HWND and HDC are “void*”. Otherwise, you get the error:
[C++ Error] GdiplusGraphics.h(37): E2015 Ambiguity between ‘Gdiplus::Graphics::Graphics(void *)’ and ‘Gdiplus::Graphics::Graphics(void *,int)’

解决办法就是在Project->Options里的Paths and Defines的Conditional Defines里面加上STRICT,这样就开启了STRICT模式,那个歧义就可以消除了!