"Project items" for dummies question

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • "Project items" for dummies question

      I always find myself disliking IDEs project management, mainly because it's not transparent I think.

      I'm playing with the simple Hello World example in emStudio, and I am trying to add a linkable library (CException).

      1. I add a dynamic folder called CException, and point to where I have cloned CException.
      2. I exclude test in the dynamic folder configuration, because I have no interest of that
      3. I click on the newly added CException, and select Compile (works just fine)
      4. In my main.c I try to do #include "CException.h" but compile fails because "CException.h: No such file or directory"

      Do I really need to import the content of CException into my project in order for this to work??

      In short, I understand _nothing_ about how emStudio handles build dependencies and how to properly add libraries to a project and I can't find any documentation either that clearly explain how to do this...
    • Hi,

      Embedded Studio does not take the include directories from the project folders.

      Instead, as with most toolchains, you need to specify them in the project options.
      To do this, in the project options go to C/C++ -> Preprocessor and add CException, or the directory CException.h is located in, to the User Include Directories.

      Adding CException.h to your Embedded Studio project will do nothing but showing it there.

      To add a library, you can either have a solution with your application project and the library project and make the application dependent on the library, this way it will link the output of the library project,
      or you add the library file in the project options at Linker -> Additional Input Files if it is no dependency of the application project.

      In general Embedded Studio doesn't do any magic. If you want it to use a file, you need to add it to the appropriate options.