Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: "David F" <David-White@xxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 05:49:53 GMT
Many thanks for all the detailed feedback. (and thanks to Mark R. too).
Everything seems to be just fine.
For new code I would obviously use UNICODE but for existing stuff
that I just want to maintain \ slightly modify, your suggestions just solve
the problems comfortably.
Regards,
David
"John Carson" <jcarson_n_o_sp_am_@xxxxxxxxxxxxxxx> wrote in message
news:#0V7If1CGHA.628@xxxxxxxxxxxxxxxxxxxxxxx
> "David F" <David-White@xxxxxxxxxxxxx> wrote in message
> news:3_isf.548$Hl6.486@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Following your suggestion, the stdafx, etc. problems are obviously
> > gone and successful compile+link worked.
> > The program seems to run correctly but useless since using older
> > code, from when I used main() rather than _tmain(), creates UI
> > problems, where I can't provide parameters, etc.
>
> By default, projects are set up to use Unicode. If you want to use ANSI
> characters, go to Project->Properties and, under
>
> Configuration Properties->General,
>
> you should set
>
> Use Character Set
>
> to
>
> Use Multi-Byte Character Set
>
> instead of the default Unicode.
>
> That is all that should be necessary to get your old code to work (at
least
> as far as character sets are concerned).
>
> If you want to use main() rather than _tmain for platform independence
> reasons, then you can easily change that manually, though this will make
no
> difference when running under Windows.
>
> > Even if I ignore the effort of converting everywhere from char to
> > _TCHAR and all associated functions, etc.(which by itself is nothing
> > to sneeze at), I simply don't like to use none C++ standards (even if
> > I need to write few more lines here and there), propriery stuff such
> > as _TCHAR. (Remember the big debates in this forum about the
> > propritery / non-portable terms BOOL, INT, INT32 instead of bool,
> > int, etc.?)
>
> We disagreed on that for the most part.
>
> > What is your best idea about converting from '_TCHAR** argv to
> > 'char** argv' or any other idea to minimize the maximum "damage",
> > especially when using existing and otherwise well proven working
> > source code and perhaps on these issues in a larger picture context
> > altogether?
>
> If you use TCHAR etc., and want your code to run on another platform, then
> all you need do is create a file for that platform that appropriately
> defines the various things you use, e.g., for a platform that only
supported
> chars, you would declare
>
> typedef char TCHAR;
>
> Any C++ compiler that isn't completely broken will happily accept that.
>
> Of course if you use Windows-specific functions that take TCHAR arguments,
> then you are going to have portability problems simply because you are
using
> Windows-specific functions, with or without the use of TCHAR.
>
> Alternatively, you can make the project setting changes I described above
> and code entirely in terms of chars. This has its own "portability"
problems
> of a different sort if you want to write international software with
> multiple language UIs.
>
> --
> John Carson
>
>
.
- References:
- VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: Mark Randall
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: Mark Randall
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: Scott McPhillips [MVP]
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: John Carson
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: John Carson
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: John Carson
- VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- Prev by Date: Re: Is thread take same memory space
- Next by Date: Re: where is a copy of atlstr.h ??
- Previous by thread: Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- Next by thread: Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- Index(es):
Relevant Pages
|