473,569 Members | 2,901 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Other than VC++

Hello

I never compiled my code using any other compiler than MS's VC++

I know that if the code written is purely ISO C++ compatible, then it should
compile fine.

How, how to allow unicode as well?

In MSVC, we have TCHAR.H that maps:
1)
strcmp and wcscmp to _tcscmp, with something like:
#ifdef UNICODE
#define _tcscmp wcscmp
#else
#define _tcscmp strcmp
#endif

2)we also have the _T macro which conditionally defines strings either as
ASCII or as unicode as:
#ifdef UNICODE
#define _T(x) L ## x
#else
#define _T(x) x
#endif

3)
char and wchar_t to TCHAR

What are the equivalent features in other compilers?
Please share your thoughts.

Regards,
Elias
Feb 14 '06 #1
8 2022
I just search around google and find a article that might relevant:

http://www.sdconsult.no/linux/wine-doc/unicode.html

Feb 15 '06 #2
lallous a écrit :
I know that if the code written is purely ISO C++ compatible, then it should
compile fine.
I think only Comeau supports the whole ISO C++ standard.
Anyway, if it runs on MSVC++ it should at least run on gcc.
How, how to allow unicode as well?


Standard C++ doesn't know what unicode is.

Your stuff is for code following the win32 api (which is C by the way
and not C++), which isn't elegant at all.
Anyway you should be able to use that with any win32 compiler I suppose.
If you want multiplatform Unicode support, you will have to use
something else (which wouldn't be a bad idea even if you only care about
win32)
Feb 15 '06 #3
loufoque wrote:
lallous a écrit :
I know that if the code written is purely ISO C++ compatible, then it
should compile fine.

I think only Comeau supports the whole ISO C++ standard.
Anyway, if it runs on MSVC++ it should at least run on gcc.


That hasn't been my experience in porting code. The two compilers have
different sets of language features and different sets of bugs.

--

Pete Becker
Roundhouse Consulting, Ltd.
Feb 15 '06 #4
Pete Becker a écrit :
That hasn't been my experience in porting code. The two compilers have
different sets of language features and different sets of bugs.


I meant if it runs using the subset of the C++ standard MSVC++ provides,
it should run with gcc.
Of course, code relying on non-standard behaviours of MSVC++ may not work.
Feb 15 '06 #5
loufoque wrote:
Pete Becker a écrit :
That hasn't been my experience in porting code. The two compilers have
different sets of language features and different sets of bugs.

I meant if it runs using the subset of the C++ standard MSVC++ provides,
it should run with gcc.
Of course, code relying on non-standard behaviours of MSVC++ may not work.


That hasn't been my experience in porting code. The two compilers have
different sets of language features and different sets of bugs. Porting
standard-conforming code to gcc is not as simple as you seem to think.

--

Pete Becker
Roundhouse Consulting, Ltd.
Feb 15 '06 #6
Pete Becker wrote:
loufoque wrote:
Pete Becker a écrit :
That hasn't been my experience in porting code. The two compilers
have different sets of language features and different sets of bugs.

I meant if it runs using the subset of the C++ standard MSVC++
provides, it should run with gcc.
Of course, code relying on non-standard behaviours of MSVC++ may not
work.


That hasn't been my experience in porting code. The two compilers have
different sets of language features and different sets of bugs. Porting
standard-conforming code to gcc is not as simple as you seem to think.


I've found that when porting code from MSVC to gcc (3.2.x,3.3.x), the
issues were with non-compliant forms that MSVC (7.1) allowed (such as
passing a temp to non-const reference). Code that compiled cleanly on
gcc also compiled cleanly on VC7.1.
Feb 15 '06 #7
Right, look like gcc is more strict than MSVC.
I had tired to modify tchar.h from MSVC to gcc comply, and sadly found
there were lots of functions not existed in glibc. Too work should be
done for migrating unicode code.
I think the better way is define a good unicode schema before coding
for multiplatform.

Feb 17 '06 #8
yangc wrote:
Right, look like gcc is more strict than MSVC.
I had tired to modify tchar.h from MSVC to gcc comply, and sadly found
there were lots of functions not existed in glibc. Too work should be
done for migrating unicode code.
I think the better way is define a good unicode schema before coding
for multiplatform.

Depends which version of MSVC you are talking about. Even existing
VC 6 code gagged when we went to 2005. The thing is a lot less
lenient.

So far we've found (reportedly from my lead programmer, I haven't
verified it myself) one excruciatingly bad bug in iostreams on
2005.
Feb 18 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1450
by: Marc ENGEL | last post by:
Hi all, I coded a python COM object that runs in a pythonw local server as a STA. This object creates and advises a VC++ COM object to receive its event. Those events are sent by worker threads. The VC++ object is free threaded. As a consequence call between my STA python object and apartment are marshalled through proxy.
0
1370
by: R Tamilarasan | last post by:
Curiosity made me to install VC - 7 (.net) in my machine which had VC - 6 already installed. I tried to compile my workspace in VC - 7 but failed due to several compile time errors. ok no problems. So I tried to revert back and uninstalled VC - 7 and compiled my workspace in VC - 6. It gave a linker error that "mfc71d.lib" is not found.
11
1897
by: Tatu Portin | last post by:
Have this kind of struct: typedef struct { char **user_comments; /* ... */ } vorbis_comment; /* prototype */ char * read_vorbis_string ( FILE *sc);
0
1515
by: Vijay Chegu | last post by:
Hi I am using vc++ .net 2003 ide with Feb 2003 platform sdk to build 64bit application. I want to use vc++ to debug the app on 64bit machine. As we do not have 64bit VC++, I would like to know how to configure VC++ IDE to do remote debugging. I can install 64bit windbg and do debugging on the local machin, as
5
2329
by: Hari | last post by:
Guys please help me to solve this strange problem what Iam getting as follows.. Trying to instantiate a global instance of a template class as follows :- when i build this code with debug and run this works fine. but if build in unicode release or release this does't work. IS THERE ANY PROBLEM OF INSTANTIATING TEMPLATE CLASSES
2
3115
by: vemulakiran | last post by:
Hi all, I have doubt regarding .NET. I have a tool which was developed on VC++ 6.0(Win32 Application ). The application communicates with library (API) which was developed on VC++ 6.0 called core client. I am planning to develop the tool or Win32 application on .NET platform and I dont' want to migrate the VC++ library (API) to .NET. The...
2
2278
by: um | last post by:
When the POSIX pthreads library for w32 release 2-2-0 (http://sources.redhat.com/pthreads-win32/) is compiled with VC++6 then it compiles and passes all the benchmark tests in the subdirectory "tests". Also, VC++ 2005 beta 1 compiles the tests fine, but here the following tests fail in execution: # semaphore1.pass \ # condvar2.pass \...
4
2311
by: jimmy_sayavong | last post by:
I created a simple MFC program using VC++ 6. It generates EXE file and runs fine on one of my computer which has the C++ compiler installed. But when I copy the EXE program to the other computer that has NOT compilter installed, the program does not run --- it asks for several DLL files !!! Does any body int his forum kind enough to...
2
3374
by: Chandru.Kundagol | last post by:
Dear Friends, I hav done some coding in visual c++ MFC based application it runs fine in my PC(windows) when i run it on some other PC(which doesnt hav microsoft visual studio tool) it doesn' t run.I think to make it run on other PC the project should be configured properly(Release mode) before building mostly im not able to configure...
7
8432
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then this installer will install them. But what about the situation where VC runtime has already been installed? In fact it's been installed twice. ...
0
7605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5501
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.