[vlc-devel] [PATCH] fixed compilation under Visual Studio

Sergey Radionov rsatom at gmail.com
Tue Jul 17 14:45:17 CEST 2012


2012/7/17 Rafaël Carré <funman at videolan.org>:
> Le 2012-07-17 10:47, Sergey Radionov a écrit :
>> 2012/7/17 Rafaël Carré <funman at videolan.org>:
>>> Hello Sergey,
>>>
>>> Le 2012-07-17 06:29, Sergey Radionov a écrit :
>>>> ---
>>>>  activex/main.cpp |   15 +++++++++++----
>>>>  1 files changed, 11 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/activex/main.cpp b/activex/main.cpp
>>>> index 61f8415..74bf4aa 100644
>>>> --- a/activex/main.cpp
>>>> +++ b/activex/main.cpp
>>>> @@ -57,7 +57,14 @@ using namespace std;
>>>>  #define THREADING_MODEL "Apartment"
>>>>  #define MISC_STATUS     "131473"
>>>>
>>>> -#define PROGID_STR COMPANY_STR"."PROGRAM_STR
>>>> +#define PROGID_STR_A COMPANY_STR"."PROGRAM_STR
>>>> +#define PROGID_STR_W TEXT(COMPANY_STR)TEXT(".")TEXT(PROGRAM_STR)
>>>> +
>>>> +#ifdef UNICODE
>>>
>>> Isn't UNICODE always defined?
>> maybe, don't know. this is standard code template in windows...
>>
>> btw, I think I forgot about issue you fixed in
>> 18896c020924f51f431641b030af8c6e488d3f4c
>> (http://git.videolan.org/?p=npapi-vlc.git;a=commit;h=18896c020924f51f431641b030af8c6e488d3f4c),
>> do I?
>
> Yes, the format character is different for char* and wchar_t* (i.e. wide
> strings).
>
> Perhaps UNICODE is (incorrectly) not defined in Visual Studio builds?
>
> I think this UNICODE / non UNICODE was only relevant until we stopped
> supporting Win 9x
>
> Which error does this fix? My windows doesn't boot currently so I can't
> test..
problem is Visual Studio just not understand following string literals
concatenation:

( L"some wide string" "and not wide string" )

it wants

( L"some wide string" L"and another wide string")

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list