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 8 2009
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)
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.
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.
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.
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.
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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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);
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |