Reputation: 1179
I have a C project that i am able to compile and run successfully, however when i add another include like #include <vector>
even without actually using the vector type i am getting the following annoying errors:
1>c:\program files (x86)\microsoft visual studio11.0\vc\include\wchar.h : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format
and around 30 more errors related to the same wchar.h
file.
I have search for a solution and i have done the suggestion to save my project files with the windows end-of-line but that didn't help.
My goal in including the vector lib is to uses vectors in my current project.
EDIT:
I tried to open the wchar.h
file using text editor but all i get is a blob of data nothing like an header file, maybe it is corrupted somehow?
Thanks.
Upvotes: 1
Views: 4469
Reputation: 5699
The file wchar.h is not in the right encoding, probably it is Unicode or UTF8.
Open wchar.h from visual studio, select all and copy, create a new h file and past and save to replace the exsiting wchar.h
Upvotes: 1
Reputation: 1179
After repairing the VS 2012 install it works as it should, i assume that the wchar.h
file got corrupted.
Upvotes: 1
Reputation: 29673
Or open wchar.h in Notepad++ -> Edit -> EOL Conversion -> Windows format. Here you can get Notepad++: http://notepad-plus-plus.org/
If you don't have it, get it. It is a must have application on every programmers PC.
Upvotes: 2