1 Reply Latest reply on Dec 17, 2013 2:55 PM by userc_2283

    How to compile with multiple source modules in WICED SDK ?

      My source code mainline, all one stream of source, has grown like Topsey and it works.



      So I started to split into the approximate Class structure that the code represents.


      I have a C file and an H file for each module/class.


      I placed the list of source C files in the MK file.


      The C files include necessary H files as and where required, #pragma once, just in case.


      Eclipse then compiles each module OK (I did rebuild the MAKE TARGET declaration) but it does not resolve the links.


      It seemed to work on the first module split, but nothing further.



      I suppose I am doing something very dumb, but I need help please.


      What are the Rules?
        • 1. Re: How to compile with multiple source modules in WICED SDK ?
          Can it find the header files?


          You may need to add:


          $(NAME)_INCLUDES += .



          This will add the directory containing the .mk file to be added to the list of include directories when building that component. If multiple components need to access header files in that directory you need to add "." to the GLOBAL_INCLUDES like this:



          GLOBAL_INCLUDES += .



          If you are having problems of unknown functions or variables when it is linking then it looks like your C files are not being compiled as part of your project.