Hello,
apaticul@[EMAIL PROTECTED]
wrote:
> On May 4, 12:11 am, "Jim Langston" <tazmas...@[EMAIL PROTECTED]
> wrote:
>> apati...@[EMAIL PROTECTED]
wrote:
>>> Now that I can compile ".cpp" files in Microsoft's Visual C++ 2008
>>> I still can't figure out how to compile a ".c" file, since
>>> every time I do it, the extension is changed to ".c.cpp"
>>> Any tips? (I mean here, those folks that have been used Visual C++
>>> before, because I need
>>> some advice on concrete terms, such as: "go to View-Other Windows- etc
>>> etc" than click here, etc )
>>> Thanks in advance.
>> In the save as dialog, drop down the "Save as type..." and select "C
source
>> file (.C)"
>>
>> --
>> Jim Langston
>> tazmas...@[EMAIL PROTECTED]
>
> Jim Langston, I'll get bet to you in a bit, as soon as I will check
> another option,
> so far, the problem is, the only way I succeeded in compiling a file
> (which was a .cpp file)
> was when I've used the feature "Precompiled Header File", and this one
> seems to be a ".cpp" Header File.
> I will try to see if I can skip this step, so I might be able to save
> my hello.c file
> in a proper format (.c)
> I can't remember all the steps I've used when I failed before to "save
> as .c"
> (which became .c.cpp anyhow) so I could follow-up with you, Jim,
> but I will retry it.
Make sure that, when you create a project, you make it an empty project
without
precompiled header files. They are of no need when just programming C.
When that's done you should be able to create a new source file and just
make
sure you save it as a .c file. (Typing the extension alone works for me).
Another
thing you might want to do is to change one of the project settings (under
C/C++
- Advanced) to "Compile as C code". I have found that it might cause
issues when
compiling it as C++ code.
Also note that VS2008 does not sup****t all the C99 features like a simple
boolean
type and it will throw a lot of warnings where it has it's own
implementations of
certain functions (like strcpy -> strcpy_s).
When you want to redistribute your application you will also have to make
sure
people have the C runtime libraries (vcredist) of which you can find
downloads on
the MSDN website.
- Jensen


|