This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

about Chinese symbols bug


platform : Windows 98se  

Mingw32 version 3.1

first report bugs:

	"asm" keyword is useful when we access a com interface who no header file,like ADO interfaces,
	
	in Microsoft C,I can use it like this:
	
	LPUNKNOWN * rs=NULL;

CoCreateInstance(CLSID_ADORecordset,NULL,CLSCTX_INPROC_SERVER,IID_ADORecordset,(PVOID*)&rs);

	__asm{
	
	push &datasource
	
	push &ctnstr
	
	push adOpenDynamic
	
	push adLockOptimistic
	
	push adCmdText

	call [rs]+"offset to Open"
	
	call [rs]+"offset to Close"
	
	call [rs] + "offset to Release"
	
	}
	
	but, In gcc ,I can't not use "asm" keyword like this,why not ?

	I wrote a test program like this ,and only compiler it ,eg:
	
	void test()
	{
		long i=0;l=0;
		
		i= 6;
		
		asm("movl i,%eax");
		asm("movl %eax,l");
		printf("%d",l);
	}
	
	but I get like this:
	
	...
	//APP
		movl i,%eax
		movl %eax,l
	//APP
	...
	
	I must change it myself .
	
	
	2. Program "windres.exe" not support Chinese symbols(I now use version 3.1)
	
	eg:
		
	101 DIALOGEX MOVEABLE PURE  DISCARDABLE 0,0,200,150
	CAPTION "TEST"
	STYLE WS_POPUP|WS_CAPTION|WS_VISIBLE
	FONT 11,"MS Serif"
	BEGIN
		LTEXT "static1",1,10,10,80,10
		LTEXT "static2",2,10,30,80,10
	END
	
	When I change "static1" and "static2" to Chinese symbols,"windres.exe" can't compiler it,and report error.

	Not noly this,When I Use a VC compiled res file who have Chinese symbols like this to "CreateDialog" to Instance a Dialog but I got a runtime error about it , why not ( I do it under windows 98se(Chinese LEGEND OEM version))? 

	3. about "ld.exe"
	
	When I Wrote a system header about ADO interface, I must use put/set to sign the same name properties.
	
	eg:
		//this is ADO header file

		DECLARE_INTERFACE(IADORecordset)
		{
		...		

		STDMETHOD(CursorLocation)(long *) PURE;
		STDMETHOD(CursorLocation)(long) PURE;
		...
		}
		
		but when I do like this, the compiler report error:
		
		//code page
		
		IADORecordset *rs=NULL;
		if(CoCreateInstance(CLSID_ADORecordset,NULL,CLSCTX_INPROC_SERVER,IID_ADORecordset,(PVOID*)&rs)=S_OK)
		{
			rs->CursorLocation = adUseClient;
			
			....
		}
		rs->Release();
		
		but gcc report I Forget "&" char,why not ?
		
		
	I think I can use dev-cpp package to develop useful program,I thanks all gnu developers.
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]