I am a programmer. I write C code in Linux using GCC
, and they can run correctly. Now, I want to run these codes in Windows system using Visual studio 2015
. But it always show some errors and warnings as following:
1>f:\md\test_sm3_hmac_02\tools.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>f:\md\test_sm3_hmac_02\types.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>f:\md\test_sm3_hmac_02\tools.h(13): error C2143: syntax error: missing ')' before '*'
1>f:\md\test_sm3_hmac_02\tools.h(13): error C2143: syntax error: missing '{' before '*'
when I open every file and copy they in new file that is created in windows and don't do any others change. It runs correctly. But my project contains many file and I don't do this to solve this problem. I want to solve it by doing few work.
The format of file created by VS2015 in windows is:
$ file testtypes.h
testtypes.h: C source, ISO-8859 text
The format of file created by touch in linux is:
$ file filetest.c
filetest.c: UTF-8 Unicode text
How can i do ?