This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compile NIR scan Nano GUI

Hi,


Based on Appendix D in User Manual, It needs Qt Framewrok and tools 5.4 or later, MinGW complier 4.9.1 to compile NIRscan Nano GUI. However, there are many software in Qt Framework and tools, install all of them needs more than 16G space in PC. Could you please tell me that I must install all of them, or only a part of them (which software?), for compiling the GUI.

  • Hi Zuomin,

    The QT framework certainly does include a lot of optional tools and libraries for Android, iOS, and source components we do not use. A base installation of QT Creator with only the following additional components allows compilation of the NIRscan Nano GUI:

    • QT -> QT 5.5 -> MinGW 4.9.2 (or if you prefer the QT 5.4 branch, you can used QT -> QT 5.4 -> MinGW 4.9.1)
    • QT -> QT Tools -> MinGW 4.9.2 (or QT -> QT Tools -> MinGW 4.9.1, if using the QT 5.4 branch)

    The GUI compiles with both the current QT 5.5 (MinGW 4.9.2) version and the older QT 5.4 (MinGW 4.9.1) version.

  • Zouming,

    You only need:

    • Tools -> QT Creator
    • MinGW 4.9.2
    • Source Components -> Essentials

    Best regards,
      Pedro

  • Hi Eric,

    Thank you and Pedro to reply my question. I installed QT5.5->MinGW 4.9.2 and QT Tools->Min GW4.9.2. But when I run Qt Creator and open the project file NirscanNanoGUI.pro, there is nothing happen if I click the Project icon on the sidebar. In Build menu, I can not select Build All because it is gray color.

    Could you please tell more detail how to modify or compile NIRscan NanoGUI?

    BRs,

    Zuomin
  • Zuomin,

    Did you configure a project when Qt was first run? Configure a project tells Qt to use the MinGW compiler kit.

    To configure a project, click on the Projects icon on the left side of the Qt Creator app. Then set it up with MinGW compiler. It should detect that compiler from the installation and just let you click on the configure project button.

    Best regards,
    Pedro
  • Zuomin,

    I loaded a fresh windows 7 virtual machine and stepped through the process below to successfully compile the GUI. Please try repeating these steps and let us know if you have any issues.

    1. Download and install the GUI v1.1.9 installer from the NIRscan Nano EVMpage
      1. During the installer process, ensure that you select 'Yes' when asked whether to set the DLP Spectrum Library environment variable. Alternatively, you can select 'No' and separately install the DLP Spectrum Library to build the library from source instead.
    2. Download and install QT: http://www.qt.io/download/
      1. Under 'Qt 5.5', select MinGW 4.9.2 only. All other components can be deselected.
      2. Under 'Tools', select MinGW 4.9.2 only. QT Creator 3.5.1 will also be picked and cannot be deselected.
      3. All other checkboxes can be deselected.
    3. After installing QT, do not start it from the installer. Instead, finish the installer and start the program from the start menu. When I started QT from the installer, the DLP Spectrum Library environment variable didn't seem to be loaded by QT.
    4. Open the NIRscanNanoGUI.pro project file
    5. You will be prompted that the .user settings file was loaded from a different environment. Select 'No', as this will then allow you to create your own build environment and set your preferred build directories. The .user file will be removed in future releases to remove this confusion.
    6. Once loaded, QT will prompt you to set up your build environment. Customize as you desire, or leave the default settings and click 'Configure Project'
    7. You will now see the project loaded, and the build and run icons in the lower left of the window will be added. However, if you build it, you will encounter an error caused by a pre-compilation step attempting to compile the Spectrum Library from source, defined in the .pro qmake file. Double click on NIRscanNanoGUI.pro shown in the list on the left.
    8. Insert the lines shown below around the pre-compilation step as shown. This will keep the DLP Spectrum Library from being compiled from source except when the environment variable is pointing to the full source of the DLP Spectrum Library.
      exists( $$(DLPSPECLIB_INSTALL_ROOT)/src/build-lib.bat ) {
      ... existing code
      }
    9. Save this file
    10. Click the build or run icon in the bottom left corner of QT Creator, and it should build without errors.

    We will fix the issues highlighted in steps 5 and 8 in future software releases to make this process more straightforward.

  • Hi Eric,

    Thank you very much for the detail solution, this lets me to install the Qt creator successfully.

    Best regards,

    Zuomin
  • Hi Eric,

    I tried to replicate these steps with Qt 5.9.1 and MinGW 5.3.0 32bit, but when I try to build the project I get these errors: http://imgur.com/rMCRlzE

    I used the DLP Spectrum Library Installer 2.0.3 to download the spectrum library and am trying to use DLP NIRscan Nano GUI (Windows) 2.1.0. I am using Windows 10

    I'm not sure how to have the header files included, any help would be appreciated
  • Hi Ben,

    Those are just warnings and shouldn't impact your ability to actually compile the GUI. It will do that the first run through if the spectrum library is precompiled on your system.

    Have you tried letting finish the compile/build? Do you get any errors then?

    -Paul
  • Hi Paul, 

    I let it finish the compile/build and I did not receive any errors, thank you!

    -Ben

  • Hi Eric,

    I am trying to develop new scan pattern with the spectrum library 2.0.3 and GUI2.1.0. First I would like to learn from the original code, so I complied the spectrum library using MinGW530_32 and try to build the GUI using Qt Creator 4.2.2. But I have two errors with factorytab.cpp. Could you please guide me how to fix this? Thanks,

    Best,

    Yanjun

  • Hi Yanjun,

    I faced this issue in the past and I am trying to remember what I did to fix this. Can you tell me what your project/build settings are? I believe you have to uncheck "shadow build" to get a successful build to work.

    If I remember correctly, the error being thrown because of the std name space call there.

    Here are my settings:

    Let me know if that works for you.

    Best,

    Paul

  • Hi Paul,

    Thanks for your information.  I tried to uncheck "shadow build", but it doesn't work. I still have the same error. Here is my build settings.

    Please let me know if further information needed. Thanks,

    Best,

    Yanjun

  • Thanks for trying that out. I spent a little more time poking around and thinking about what I did to get around this issue.

    Can you try using QT MinGW 5.8 instead of 5.3? I believe that when I changed to 5.8 that the error went away.

    -Paul
  • Hi Paul,

    I get around that error but have another error here. BTW, I use the latest Qt 5.9.2. Do you think this is the reason?

    Here are the setting and error.

    Thanks,

    Best,

    Yanjun

  • Hi Yanjun,

    I haven't seen that Carbon.h file before. Is that part of your custom software? If not, could you tell me where to find it?

    For the error - I would try to install 5.8 if you are able because I am able to verify that it works on that version.

    -Paul
  • Hi Paul,

    Thanks for your suggestion. I have figured out the problem. We need to use Qt5.8 to compile the GUI. But I have another quick question about the scan configuration in the GUI. How does the GUI calculate the "Max patterns used"? Could you please give me some hints? Thanks,

    Best,

    Yanjun

  • Glad that you got it working. Max patterns is calculated based on the memory size of Tiva processor, it can only hold so many patterns and the number of patterns changes based on the pattern configuration. You can find the function in scanconfigdialog.cpp, it's called getMaxPatterns().

    -Paul