4 Replies Latest reply on Oct 6, 2016 3:07 AM by ngaman

    QMSI include file handling broken

    ngaman

      QMSI is based on Eclipse but the preprocessor file include path handling seems to be broken.

      Consder the following source

       

      #include "qm_common.h"

      #include "hw.h"

      int main(void)

      {

        QM_PRINTF(HW_TEXT);

      }

       

      My "hw.h" files sits outside the QMSI workspace in another directory e.g. C:/temp/includes, and contains the text

       

      #define HW_TEXT "Hello World"

       

      I point QMSI at the include file path via the project options tab

      pp.png

       

      THis is reflected in the Project Explorer

      pp2.png

       

      The compiler fails to find the "Hw.h" file.

      main.c:35:16: fatal error: hw.h: No such file or directory

       

      Oddly enough, when in the Edit perspective, I can right click in the "hw.h" field and choose "Open Declaration" and it opens the file in an Edit window.

      Inspiration anyone?

       

      P.S. I use Eclipse in another guise (TI Code Composer) and there it works fine althought the layout is different.

        • 1. Re: QMSI include file handling broken
          J.Pacheco

          Hi ngaman,

           

          I have done a test using your header file but instead of
          adding a new folder in the Includes section, I added it in the folder
          highlighted in the image. After doing this I included it in my source file as
          "#include "hw.h" and it compiled with no errors.  I hope you find this information useful, if
          not please specify what are you exactly doing with this header file in order to
          assist you in a better way.

           

          include case.PNG

           

          I will be waiting for your reply and remember we are always happy help you.

           

          Regards

          -Jose.                                                                                                
                                                                                                                                        

          • 2. Re: QMSI include file handling broken
            ngaman

            Hi Jose, Thanks for the prompt answer but it doesn't really address the issue.

            It should be possible to keep a single copy of a source library and include it into any project. Also it should also be possible to keep sources in separate folders according to function.

            My PC contains several development environments, Eclipse Neon, QMSI, Visual Studio, Code Composer and Atmel Studio. I want the ability to keep a single copy of a source library and use it anywhere. Right now I can do that with Eclipse, Visual Studio, Code Composer and Atmel Studio but not with QMSI.

            • 3. Re: QMSI include file handling broken
              MichelleC_Intel

              Hi ,

               

              To add the include path, open the Project properties menu and select C/C++ General->Paths and Symbols. In the Path and Symbols dialog, select GNU C and the Includes tab as shown
              below:

               
              Press Add on the right. In the following dialog, select File system and choose the folder.After selection, the path to the project will be added.

              The IDE modifications are complete now but you cannot build the project because include and paths are not reflected in the project makefiles.
              The next step will complete the project customization. Open the app.mk file from Project Explorer. Add "CFLAGS += -IC:/temp/includes" (or wherever the dir is ..) before the "QFU_GEN_0= …" line. Build the project.

               

              We are currently in the process of updating the User an Reference Guide with this information so let me know if it works ok for you .

              --Michelle

              • 4. Re: QMSI include file handling broken
                ngaman

                Michelle, I can't believe that you are offering this as a solution. At best its a temporary work-around.

                QMSI has broken Eclipse and the only solution is to fix it. People work on Eclipse in a variety of environments and that should all behave the same way.