1 Reply Latest reply on Jun 12, 2017 10:01 PM by AnkitaS_51

    Adding existing header and source

    shuji_mikami_2509641

      I have a trouble in adding existing header file and source file.

         

      The directory structure is like following,

         

      workspace folder/

         

              project folder(.cydsn)/

         

                       main.c

         

                       UserCode/

         

                              header.h

         

                              source.c

         

      I added include path "./UserCode", so, I could call constants declared in header.h from main.c.

         

      But, when I call the function declared in header.h and defined in source.c from main.c, 

         

      PSoC Creator outputs error "undefined reference to the function".

         

      When I create new header and source in PSoC Creator Workspace Explorer, and copy the contents from existing files, PSoC Creator outputs no error.

         

      How to fix this error?