
安装好之后问题又来了,我的PS/2键盘右不能用了!上网查,最后把鼠标也换成PS/2口的,搞定!
看看hello world吧

现在这篇blog也是在Mac下面发表的,哈哈

| Article ID | : | 309801 |
| Last Review | : | January 9, 2006 |
| Revision | : | 3.0 |
typedef ATL::CStringT< wchar_t, StrTraitMFC< wchar_t > > CStringW;
typedef ATL::CStringT< char, StrTraitMFC< char > > CStringA;
typedef ATL::CStringT< TCHAR, StrTraitMFC< TCHAR > > CString;
template class __declspec(dllimport) CStringT<TCHAR, StrTraitMFC<TCHAR, ChTraitsCRT<TCHAR> > >;
template class __declspec(dllimport) CSimpleStringT<TCHAR>;
| 1. | In Visual C++ 2005 or in Visual C++ .NET, create a default MFC DLL project. | ||||||||
| 2. | On the Project menu, click Add New Item. | ||||||||
| 3. | Name the file MyString.h. Select the Header File template, and then click Open. Note In Visual Studio 2005, click Add instead of Open. | ||||||||
| 4. | Add the following code to MyString.h:
| ||||||||
| 5. | Add a new C++ source file to the project named MyString.cpp. | ||||||||
| 6. | Add the following code to MyString.cpp:
| ||||||||
| 7. | Save and build the DLL project. | ||||||||
| 8. | Create a new Win32 Project. In the wizard, change the setting under Application Settings to the Console Application type, and then click to select the MFC checkbox to add MFC support. | ||||||||
| 9. | In the new application's main source file, include MyString.h from the DLL project. Verify that the correct full path or relative path is being used. | ||||||||
| 10. | Before the main function, add a #pragma to link to the library for the DLL (again, be sure to use a correct full path or relative path), as follows:
| ||||||||
| 11. | Add the following code in the else block of the main function:
Note In Visual C++ 2005, you must add the common language runtime support compiler option (/clr:oldSyntax) to successfully compile the previous code sample. To add the common language runtime support compiler option, follow these steps:
For more information about common language runtime support compiler options, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/k8d11d4s.aspx (http://msdn2.microsoft.com/en-us/library/k8d11d4s.aspx) | ||||||||
| 12. | Build the project. The build fails with the "LNK2019" error. | ||||||||
| 13. | In the console application, add a new C++ source file named Simple.cpp. | ||||||||
| 14. | Add the following code to Simple.cpp:
| ||||||||
| 15. | Build the project again. You receive the "LNK2005" and "LNK1169" error messages. | ||||||||
| 16. | Apply the solution provided in the "Resolution" section of this article. The project should now build without errors. |
Forum Nokia 宣布将在2008年逐渐放弃CodeWarrior作为Symbian平台开发工具,最终转移到Carbide C++。到此,Nokia终于结束开发工具依赖第三方公司产品的局面(Carbide虽然是基于Eclips,但是这个是开源的)
摘抄自
http://www.newlc.com/inside-cbase-class-six-essential-questions
如果你可以回答下面的6个问题,那么你可以不用看这篇文章了
下面是这6个问题的答案:
CTest* CTest::NewLC()
{
CTest* self = new ( ELeave ) CTest;
CleanupStack::PushL( self );
self->ConstructL()
return self;
}
void CTest::ConstructL()
{
iPointer = CMustLeave::NewL(); // assume this leaves
}
CTest::~CTest()
{
if( iPointer )
{
delete iPointer;
iPointer = NULL;
}
}
如果iPointer没有初始化为NULL,则通过Cleanup Stack析构时可能导致程序崩溃。CBase* pointer = new ( ELeave ) CBase;
CBase base = *pointer; // call copy constructor编译器会报错
CBase* pointer = new ( ELeave ) CBase;
CBase base;
base = *pointer; // call operator =
这样防止的不被注意的浅拷贝问题,如果需要一个深拷贝函数,可以实现一个自己的public克隆函数例如CloneL()
| License | Lite | Std | Full | Eval |
| Non-commercial use | ||||
| Commercial use | - |
| Supported Platforms | Lite | Std | Full | Eval |
| Windows Mobile Pocket PC up to 5.0 | ||||
| Windows Mobile Smartphone up to 5.0 | ||||
| Symbian Series 60 up to S60 3rd edition | ||||
| Symbian UIQ up to 3.0 | ||||
| Symbian Series 80 (Nokia Communicator) | ||||
| Symbian Series 90 (Nokia 7710) | ||||
| Gamepark Holdings GP2X handheld | ||||
| Windows desktop | ||||
| Upcoming supported platforms |
| 2D Graphics | Lite | Std | Full | Eval |
| 2D surfaces | ||||
| Screen orientation awareness | ||||
| Drawing primitives | ||||
| Color key transparency | ||||
| Advanced color filters | ||||
| Dynamic clipping | ||||
| Advanced rasterized font text drawing | ||||
| Surface rotation and scaling | ||||
| DirectDraw hardware support for Windows | ||||
| Direct Screen Access for Symbian | ||||
| Bounding box collision detection | ||||
| Pixel precise collision detection | - | |||
| RGBA surfaces | - | - | ||
| Built-in screen wipes | - | - | ||
| Custom pixel shaders | - | - |
| Optimized Blitlet Support | Lite | Std | Full | Eval |
| Lite optimized blitlet set | ||||
| Standard optimized blitlet set | - | |||
| Full optimized blitlet set | - | - |
| Supported Image and 3D Formats | Lite | Std | Full | Eval |
| BMP (Windows bitmap) | ||||
| PNG (Portable Network Graphics) | - | |||
| GIF (Graphics Interchange Format) | - | |||
| TGA (Targa) | - | - | ||
| JPEG (Joint Photographic Experts Group) | - | - | ||
| 3DS (3D Studio) | - | - | ||
| MS3D (MilkShape 3D) | - | - |
| 3D Graphics | Lite | Std | Full | Eval |
| 3D surfaces | - | - | ||
| OpenGL?ES 1.1 support | - | - | ||
| Internal EDGELIB 3D renderer | - | - | ||
| 3D skeletal animation | - | - | ||
| OpenGL?ES helper functions | - | - | ||
| 3D collision detection (TBA) | - | - |
| Network Connectivity | Lite | Std | Full | Eval |
| Bluetooth | - | |||
| TCP/IP (wifi/gprs/umts) | - | |||
| HTTP functionality | - | |||
| Chillingo ClickPayGo support | - |
| File Handling | Lite | Std | Full | Eval |
| Basic file reading and writing | ||||
| Reading from Edge Resource Packs | ||||
| Writing to Edge Resource Packs | - | |||
| Reading from INI configuration files | - | |||
| Writing to INI configuration files | - | - | ||
| Folder manipulation | - | - |
| Input | Lite | Std | Full | Eval |
| Supported input devices and buttons | ||||
| Key mappings | ||||
| TiltCONTROL hardware device support | - |
| Miscellaneous | Lite | Std | Full | Eval |
| Standard class | ||||
| Memory class | ||||
| Sound library plug-in support | ||||
| Timer class | ||||
| Math class | ||||
| Debugging tools | ||||
| Dynamic registration class | ||||
| Device information class | ||||
| Event recording | - |
| SDK Tools | Lite | Std | Full | Eval |
| EDGELIB Builder | ||||
| EDGELIB Packer | ||||
| EDGELIB Animation Strip Maker | ||||
| EDGELIB Font Organizer | ||||
| EDGELIB Tile Scanner |
| Provided Support | Lite | Std | Full | Eval |
| Public forum | ||||
| - | - | |||
| Instant Messaging | - | - | - |