jackun / USBqemu-wheel

PCSX2 usb plugin for wheels and increasingly more stuff
The Unlicense
121 stars 21 forks source link

VS throws C4819 (because degree symbol) #4

Closed yxmline closed 9 years ago

yxmline commented 10 years ago

Because the dialog.h compiler error using utf-16le with BOM to save src/usb-pad/dx/dialog.h

jackun commented 10 years ago

You mean src/usb-pad/dx/dialog.h has BOM? Hmm, I don't see it with hexdump.

yxmline commented 10 years ago

The default is iso-8859-1 But the coding causes not on non iso-8859-1 systems through compiled some characters are garbled There will be the following information: src\usb-pad/dx/dialoh (482): error C2065: "I": is not declared identifies ps:UTF-8 can also be

jackun commented 10 years ago

Weird, no problems for me with VS2010. Can you paste the whole error with latest source? That line number is iffy.

Edit: Ah, wait, so current dialog.h encoding causes error on compile, but converting to UTF-8 or whatever makes it compile like that? Ughh....

yxmline commented 10 years ago

System.NullReferenceException: Object reference not set to an instance of an object. In Ice.VisualStudio.Builder.buildBegin (vsBuildScope scope, vsBuildAction action)

Microsoft (R) Visual Studio 10.0.40219.1 edition. Copyright (C) Microsoft Corp. All rights reserved. 1> ------ Build started: Project: ZERO_CHECK, Configuration: Release Win32 ------ 1> Checking Build System 1> CMake does not need to re-run because D: /Winlinux/Msys64/home/Administrator/pcsx2/USBqemu-wheel/build/CMakeFiles/generate.stamp is up-to-date. 2> ------ Build started: Project: USBqemu-wheel, Configuration: Release Win32 ------ 2> Building Custom Rule D: /Winlinux/Msys64/home/Administrator/pcsx2/USBqemu-wheel/src/CMakeLists.txt 2> CMake does not need to re-run because D: \ Winlinux \ Msys64 \ home \ Administrator \ pcsx2 \ USBqemu-wheel \ build \ CMakeFiles \ generate.stamp is up-to-date. 2> Config.cpp 2> .. \ src \ Win32 \ Config.cpp (14): warning C4996: 'mbstowcs':. This function or variable may be unsafe Consider using mbstowcs_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details... 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ stdlib.h (498): see "mbstowcs" statement 2> .. \ src \ Win32 \ Config.cpp (22): warning C4996: 'mbstowcs':. This function or variable may be unsafe Consider using mbstowcs_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details... 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ stdlib.h (498): see "mbstowcs" statement 2> .. \ src \ Win32 \ Config.cpp (51): warning C4996: '_wfopen':. This function or variable may be unsafe Consider using _wfopen_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details... 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ stdio.h (601): see declaration "_wfopen" the 2> .. \ src \ Win32 \ Config.cpp (97): warning C4996: '_wfopen':. This function or variable may be unsafe Consider using _wfopen_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details... 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ stdio.h (601): see declaration "_wfopen" the 2> Win32.cpp 2> usb-pad-dx.cpp 2> usb-pad-raw.cpp 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ ddk \ hidpi.h: warning C4819: The file contains a character can not be represented in the current code page (936) in the. Please save the file as Unicode format to prevent data loss 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ ddk \ hidpi.h (806): warning C4819: The file contains a character can not be represented in the current code page (936) in the. Please save the file as Unicode format to prevent data loss 2> USB.cpp 2> D: \ Winlinux \ DirectX \ SDK \ Include \ dinput.h: DIRECTINPUT_VERSION undefined Defaulting to version 0x0800. 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (179): warning C4244: "initialized": transition from "float" to "int" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (290): warning C4244: "=": transition from "double" to "float" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (302): warning C4244: "initialized": transition from "double" to "float" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (304): warning C4244: "initialized": transition from "double" to "float" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (326): warning C4244: "initialized": transition from "double" to "int" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (529): warning C4244: "=": transition from "double" to "LONG" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad \ dx \ di.h (531): warning C4244: "=": transition from "double" to "LONG" may lose data 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h: warning C4819: The file contains a character can not be represented in the current code page (936) in the. Please save the file as Unicode format to prevent data loss 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (480): error C2143: syntax error: missing '}' (in the "constant" of front) 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (480): error C2143: syntax error: missing ';' (in the "constant" of front) 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (480): error C2059: syntax error: "" 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (480): error C2001: newline in constant 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (482): error C2065: "i": undeclared identifier 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (482): error C2065: "i": undeclared identifier 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (482): error C2143: syntax error: missing ';' (in '), "the front) 2> d: \ winlinux \ msys64 \ home \ administrator \ pcsx2 \ usbqemu-wheel \ src \ usb-pad / dx / dialog.h (482): error C2143: syntax error: missing ';' (in '), "the front) 2> .. \ src \ USB.cpp (366): warning C4018: "> =": signed / unsigned mismatch 2> usb-hid.cpp 2> .. \ src \ qemu-usb \ usb-hid.cpp (529): warning C4996: 'strncpy':... This function or variable may be unsafe Consider using strncpy_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ string.h (188): see "strncpy" statement 2> .. \ src \ qemu-usb \ usb-hid.cpp (550): warning C4996: 'strncpy':... This function or variable may be unsafe Consider using strncpy_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ string.h (188): see "strncpy" statement 2> usb-hub.cpp 2> .. \ src \ qemu-usb \ usb-hub.cpp (319): warning C4018: "> =": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-hub.cpp (322): warning C4244: "=": transition from "uint16_t" to "uint8_t", may lose data 2> .. \ src \ qemu-usb \ usb-hub.cpp (324): warning C4244: "=": transition from "uint16_t" to "uint8_t", may lose data 2> .. \ src \ qemu-usb \ usb-hub.cpp (342): warning C4018: "> =": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-hub.cpp (372): warning C4018: "> =": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-hub.cpp (553): warning C4996: 'strncpy':... This function or variable may be unsafe Consider using strncpy_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ string.h (188): see "strncpy" statement 2> vl.cpp 2> .. \ src \ qemu-usb \ vl.cpp (39): warning C4244: "=": transition from "uint64_t" to "uint32_t", may lose data 2> usb-base.cpp 2> usb-msd.cpp 2> .. \ src \ qemu-usb \ usb-msd.cpp (610): warning C4018: ">": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-msd.cpp (650): warning C4018: ">": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-msd.cpp (700): warning C4996: '_wfopen':. This function or variable may be unsafe Consider using _wfopen_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help.. for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ stdio.h (601): see declaration "_wfopen" the 2> .. \ src \ qemu-usb \ usb-msd.cpp (716): warning C4996: 'sprintf':. This function or variable may be unsafe Consider using sprintf_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help.. for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ stdio.h (371): see "sprintf" statement 2> usb-ohci.cpp 2> .. \ src \ qemu-usb \ usb-ohci.cpp (319): warning C4018: ">": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-ohci.cpp (337): warning C4018: ">": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-ohci.cpp (546): warning C4018: "<=": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-ohci.cpp (1036): warning C4244: "Parameters": transition from "int64_t" to "uint32_t", may lose data 2> .. \ src \ qemu-usb \ usb-ohci.cpp (1036): warning C4244: "Parameters": transition from "int64_t" to "uint32_t", may lose data 2> .. \ src \ qemu-usb \ usb-ohci.cpp (1136): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ qemu-usb \ usb-ohci.cpp (1221): warning C4018: "<": signed / unsigned mismatch 2> usb-mic-singstar.cpp 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (771): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (771): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (792): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (792): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (809): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (809): warning C4018: "<": signed / unsigned mismatch 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (834): warning C4102: "fail": unreferenced label 2> .. \ src \ usb-mic \ usb-mic-singstar.cpp (919): warning C4996: 'strncpy':... This function or variable may be unsafe Consider using strncpy_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ string.h (188): see "strncpy" statement 2> audiosrc-win32.cpp 2> bitjuggling.cpp 2> usb-pad.cpp 2> .. \ src \ usb-pad \ usb-pad.cpp (313): warning C4996: 'strncpy':... This function or variable may be unsafe Consider using strncpy_s instead To disable deprecation, use _CRT_SECURE_NO_WARNINGS See online help for details. 2> D: \ Program Files (x86) \ Microsoft Visual Studio \ VS10 \ VC \ include \ string.h (188): see "strncpy" statement 2> Generating Code ... 3> ------ Build started: Project: ALL_BUILD, Configuration: Release Win32 ------ 3> Building Custom Rule D: /Winlinux/Msys64/home/Administrator/pcsx2/USBqemu-wheel/src/CMakeLists.txt 3> CMake does not need to re-run because D: \ Winlinux \ Msys64 \ home \ Administrator \ pcsx2 \ USBqemu-wheel \ build \ CMakeFiles \ generate.stamp is up-to-date. 3> Build all projects ========== Build: Success 2, failed one, the latest 0, 0 skipped ==========

jackun commented 10 years ago

Ok, it doesn't like °, sigh.

jackun commented 10 years ago

5553e498af17de828bf86727ea80fc562294dccf commit helps?

yxmline commented 10 years ago

https://github.com/jackun/USBqemu-wheel/commit/5553e498af17de828bf86727ea80fc562294dccf Not resolved

jackun commented 10 years ago

Ok, i'll nuke it from orbit.

E: http://stackoverflow.com/questions/688760/how-to-create-a-utf-8-string-literal-in-visual-c-2008

yxmline commented 10 years ago

build ok thanks The compiler does not like ° T_T

yxmline commented 10 years ago

thanks fix

jackun commented 9 years ago

Note for future reference: msvc uses opsys' locale. For weird character support save as unicode with BOM.