Add New Item C

Sysprogs forums Forums VisualGDB Add New Item C

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11313
    Arturs
    Participant

    Hi

    How Can I add new Item to my project for STM32 in C lang ? Now I can only add .cpp file.

    Regards

    Artur

    #11316
    support
    Keymaster

    Hi,

    The easiest way would be to add another .cpp file and rename it to .c.

    #11319
    Arturs
    Participant

    I do it in the way but then the standard template  is not created.

    • This reply was modified 6 years, 11 months ago by Arturs.
    #11322
    support
    Keymaster

    Hi,

    Not sure what you mean by the “standard template”. Could you please provide an example?

    #11323
    Arturs
    Participant

    #ifndef HEADER_FILE
    #define HEADER_FILE

    the entire header file file

    #endif

    I think the above code is standard for c lang not pragma once.

    Of course I can add the lines but I would like to know how yo create c file automatically

    • This reply was modified 6 years, 11 months ago by Arturs.
    • This reply was modified 6 years, 11 months ago by Arturs.
    #11326
    support
    Keymaster

    Hi,

    GCC should actually support #pragma once when compiling .c files as well, so normally you won’t need this.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.