Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. using Creator as editor/code browser
Forum Updated to NodeBB v4.3 + New Features

using Creator as editor/code browser

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
11 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi all -

    In addition to using Creator to write Qt apps, I use it for other programs as well. (After all, it is the best IDE in the world.) Normally it works fine, but I'm trying to use it with the Espressif esp-idf, and it's giving me some problems. Here's an example:
    creator.PNG
    The red circles are for this error message:

    *ip_addr.h:40:10: error: 'lwip/opt.h' file not found*
    

    But if I click on the filename, and hit F2, it takes me to the file.

    The path to the file is in my project file, so that's not the problem.

    Any ideas? This is just one small example, but I think if I can get to the bottom of this, I can fix a lot of the other similar problems.

    Thanks...

    K 1 Reply Last reply
    0
    • mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by
      #2

      Anyone have an idea?

      aha_1980A 1 Reply Last reply
      0
      • mzimmersM mzimmers

        Anyone have an idea?

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @mzimmers

        So you are using a Generic Project?

        Have you set up the .includes file correctly?

        Regards

        PS: I'm doing very similar things as you with Creator ;)

        Qt has to stay free or it will die.

        mzimmersM 1 Reply Last reply
        2
        • aha_1980A aha_1980

          @mzimmers

          So you are using a Generic Project?

          Have you set up the .includes file correctly?

          Regards

          PS: I'm doing very similar things as you with Creator ;)

          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #4

          @aha_1980 I wasn't aware of the generic project option. This is excellent stuff. Is there a way to use QMake variables in the includes file?

          aha_1980A 1 Reply Last reply
          0
          • mzimmersM mzimmers

            @aha_1980 I wasn't aware of the generic project option. This is excellent stuff. Is there a way to use QMake variables in the includes file?

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @mzimmers unfortunately, not.

            Which variables did you think of?

            Regards

            Qt has to stay free or it will die.

            1 Reply Last reply
            0
            • mzimmersM Offline
              mzimmersM Offline
              mzimmers
              wrote on last edited by
              #6

              None in particular; just curious.

              I do use a couple functions (setenv and tzset) that are hidden in time.h with STRICT_ANSI. Qt raises an error, though it compiles. Can you think of a setting I can use to fix this? This isn't a big deal; just a convenience.

              aha_1980A 1 Reply Last reply
              0
              • mzimmersM mzimmers

                None in particular; just curious.

                I do use a couple functions (setenv and tzset) that are hidden in time.h with STRICT_ANSI. Qt raises an error, though it compiles. Can you think of a setting I can use to fix this? This isn't a big deal; just a convenience.

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by aha_1980
                #7

                Hi @mzimmers,

                if you just want to set a define, you can do so in the .config file, just like in code: #define FOO 42

                I use that to hide embedded compiler specific stuff from the editor.

                But that is all I'm aware of.

                Regards

                Qt has to stay free or it will die.

                1 Reply Last reply
                0
                • mzimmersM mzimmers

                  Hi all -

                  In addition to using Creator to write Qt apps, I use it for other programs as well. (After all, it is the best IDE in the world.) Normally it works fine, but I'm trying to use it with the Espressif esp-idf, and it's giving me some problems. Here's an example:
                  creator.PNG
                  The red circles are for this error message:

                  *ip_addr.h:40:10: error: 'lwip/opt.h' file not found*
                  

                  But if I click on the filename, and hit F2, it takes me to the file.

                  The path to the file is in my project file, so that's not the problem.

                  Any ideas? This is just one small example, but I think if I can get to the bottom of this, I can fix a lot of the other similar problems.

                  Thanks...

                  K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by kuzulis
                  #8

                  @mzimmers said in using Creator as editor/code browser:

                  Espressif esp-idf

                  But. AFAIK, the ESP32 SDK use the CMake. So, is it not option for you? Because as I understand, the CMakePM should correct highlight the includes and macros.. No?

                  mzimmersM 1 Reply Last reply
                  0
                  • K kuzulis

                    @mzimmers said in using Creator as editor/code browser:

                    Espressif esp-idf

                    But. AFAIK, the ESP32 SDK use the CMake. So, is it not option for you? Because as I understand, the CMakePM should correct highlight the includes and macros.. No?

                    mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #9

                    @kuzulis yes, the ESP32 toolchain uses CMake (as of v4.0 anyway), but I'm not sure I get your point. I'm not really familiar with CMake -- this is the first project I've used it, and I pretty much just follow the directions on how to use the idf.py commands.

                    K 1 Reply Last reply
                    0
                    • mzimmersM mzimmers

                      @kuzulis yes, the ESP32 toolchain uses CMake (as of v4.0 anyway), but I'm not sure I get your point. I'm not really familiar with CMake -- this is the first project I've used it, and I pretty much just follow the directions on how to use the idf.py commands.

                      K Offline
                      K Offline
                      kuzulis
                      Qt Champions 2020
                      wrote on last edited by kuzulis
                      #10

                      @mzimmers said in using Creator as editor/code browser:

                      but I'm not sure I get your point. I'm not really familiar with CMake

                      I meant that you can try to use the CMake for your project (instead of qmake or a generic project import). In this case you can even build your project with CMake, and in this case the QtCreator should highlight the sources correctly.

                      As an option, you can try to disable the clang-code-model plugin, because it is buggy.

                      PS: For example I personally for our projects use the QBS (even for Espressif ESP8266 chip). And the QtCreator highlight the sources correctly then (but I don't use the clang-code-model, if to be honest).

                      1 Reply Last reply
                      0
                      • mzimmersM Offline
                        mzimmersM Offline
                        mzimmers
                        wrote on last edited by
                        #11

                        My project does use CMake -- I just don't invoke it via Qt Creator; I use the esp-idf command interface for that. It would be great to be able to build from Creator, but that's the next step.

                        Perhaps I wasn't clear -- Creator is (now) correctly highlighting the source. I needed to work with the .includes file, but got it working.

                        From this page:

                        __STRICT_ANSI__
                        GCC defines this macro if and only if the -ansi switch, or a -std switch specifying strict conformance to some version of ISO C or ISO C++, was specified when GCC was invoked. It is defined to ‘1’. This macro exists primarily to direct GNU libc’s header files to use only definitions found in standard C.
                        

                        So maybe I should modify my .cxxflags file to match whatever settings the IDF toolchain uses?

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved