¿í×Ö·ûÖ§³Ö£¨linux£¬MinGW£¬Qt£©
1¡£ÒªÊ¹Óÿí×Ö·ûÖ§³Ö£¬Ê¹ÓÃw¿ªÍ·µÄһϵÁж«Î÷£¬Èçwstring£¬wofstreamµÈ¡£ÔÚʹÓÃwstringµÄʱºò£¬³£Á¿×Ö·û´®Ç°ÃæÒª¼ÓÉÏL£¬ÕâÑù²ÅÄÜת»»³Éwchar_tÐ͵Ä
else if(fileName.substr(fileName.rfind(L"."))==L".prj")
2¡£Ò»¸öÎļþÁ÷£¨ÎÞÂÛÊÇofstream»¹ÊÇwofstream£©£¬Ö»Ö§³Öconst char*×÷ΪÎļþÃû£¬¶ÔÓÚ¿í×Ö·ûµÄwstringµÄÎļþÃû£¬¸Ã×öһЩ´¦Àí¡£
DTchar mbsFileName[512];
DTint mbsSize=std::wcstombs(mbsFileName,m_dumpFileName.c_str(),m_dumpFileName.size()*sizeof(wchar_t));
mbsFileName[mbsSize]=0;
m_pDumpStream=new std::fstream(mbsFileName,std::ios::out|std::ios::binary);
ÉÏÃæµÄ´úÂëҪעÒâµÄÊÇ£¬wcstombsת»»ºóµÄcharÐòÁв¢Ã»ÓÐ0×Ö·û´®½áβ·û,ËùÒÔÄóöÈ¥Ö±½Óµ±×Ö·û´®Ê¹Óûá³ö´í¡£
»òÕß“You can use wcstombs() to narrow the filename or if you're feeling adventurous, the narrow() member function of the ctype facet of a std::locale.”
¼ûhttp://www.gamedev.net/community/forums/topic.asp?topic_id=358254&whichpage=1?
3¡£MinGW²»Ö§³Öwchar_t,ºÃÏñÊÇÒòΪlinuxϵÄwchar_tÊÇ4×ֽڵ쬶øwindowsÏÂvcÔËÐÐʱµÄwchar_tÊÇ2×ֽڵġ£
¼ûQtÖÐqstring.cppÖеÄÒ»¶Îdoxygen×¢ÊÍ
#ifndef QT_NO_STL
/*! fn QString QString::fromStdWString(const std::wstring &str)
Returns a copy of a str. a str is assumed to be encoded in
utf16 if the size of wchar_t is 2 bytes (e.g. on windows) and ucs4
if the size of wchar_t is 4 bytes (most Unix systems).
This constructor is only available if Qt is configured with STL
compabitility enabled.
sa fromUtf16(), fromLatin1(), fromLocal8Bit(), fromUtf8()
*/
¼ûMinGWµÄ¹Ù·½ÉùÃ÷£ºhttp://www.mingw.org/MinGWiki/index.php/wide%20characters
ÆäÖл¹ÓÐ2¸öÁ¬½Ó¡£
ÁíÍ⣺һ¸öhpµÄ¼Ò»ïhackµÄ·½·¨£º
http://lists.zerezo.com/mingw-users/msg00753.html
ºÜ¸´ÔÓ£¬ÎÒÓÖ²»¶®£¬°¦¡£¡£¡£¡£¾øÍû¡£
ÔÚlinuxϵÄÖ§³Ö¿í×Ö·ûµÄ£¬Ã»·¨ÔÚwindowsÏÂÒÆÖ²ÁË¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
4.MinGWϵÄQtÊÇÖ§³Ö¿í×Ö·ûµÄ£¬ÎÒ»¹²âÊÔÁËһϣ¬Èç¹ûÎļþ·¾¶Öк¬ÓГ×ÀÃæ”¶þ×Ö£¬Îҵķǿí×Ö·ûÖ§³ÖµÄ³ÌÐò»ár
Ïà¹ØÎĵµ£º
#ifndef __KERNEL__
#define __KERNEL__
#endif
#ifndef MODULE
#define MODULE
#endif
#include<linux/config.h>
#include<linux/module.h>
#include<linux/version.h>
#include<linux/init.h>
#include<linux/kernel.h>
#include<linux/errno.h>
#include<linux/sche ......
Linux Execution and Virtual Memory Utilization
LinuxÖ´ÐÐÒÔ¼°ÐéÄâÄÚ´æÖ®ÓÃ
When Linux boots, it starts with the MMU disabled, so initially it deals only with physical
memory. The kernel image is copied to physical address 0x8000 in DRAM and executed. First a master page table is created ......
aishen944-163.com
תÌùÇë×¢Ã÷³ö´¦£¬Ð»Ð»£¡£¡
Æäʵ͸Ã÷ÌùͼµÄÔÀí¾ÍÊǽøÐÐxorÔËË㣬
»ù±¾¹«Ê½£ºA xor A = 0 A xor 0 = A A xor A xor B = B
¼ÙÈçÏÖÔÚÓÐÁ½ÕÅͼƬ£¬Ò»ÕÅÊÇÎÒÃÇÒª¶ÔÆä½øÐÐÌùͼµÄͼƬA£¬ ÁíÍâÒ»ÕÅÊÇÒª±»ÌùͼµÄͼƬB
1£¬ ¸´ÖÆÍ¼Æ¬BµÄÒ»·Ý¿½±´ÎªC
2£¬ ½«CÖÐÖ¸¶¨ ......
1¡¢ÒýÑÔ
ÔÚlinuxϵͳÏ£¬Èç¹ûÄãÏÂÔØ²¢°²×°ÁËÓ¦ÓóÌÐò£¬ºÜÓпÉÄÜÔÚ¼üÈëËüµÄÃû³ÆÊ±³öÏÖ“command not found”µÄÌáʾÄÚÈÝ¡£Èç¹ûÿ´Î¶¼µ½°²×°Ä¿±êÎļþ¼ÐÄÚ£¬ÕÒµ½¿ÉÖ´ÐÐÎļþÀ´½øÐвÙ×÷¾ÍÌ«·±ËöÁË¡£ÕâÉæ¼°µ½»·¾³±äÁ¿PATHµÄÉèÖÃÎÊÌ⣬¶øPATHµÄÉèÖÃÒ²ÊÇÔÚlinux϶¨ÖÆ»·¾³±äÁ¿µÄÒ»¸ö×é³É²¿·Ö¡£±¾ÎÄ»ùÓ ......