Error on a New Linux & QT5 install, No Such File Error

Viewed 21

I am in the process of trying to build an existing QT project on a new Fedora Linux install and I am having some include path issues. I am a linux novice as well. The error I am getting is

/home/ken/Desktop/navstand_2022_8_1/include.h:62: error: labjackusb.h: No such file or directory
In file included from ../navstand_2022_8_1/prophylr.h:2,
                 from ../navstand_2022_8_1/main.cpp:3:
../navstand_2022_8_1/include.h:62:10: fatal error: labjackusb.h: No such file or directory
   62 | #include <labjackusb.h>
      |          ^~~~~~~~~~~~~~
  

which says in can not find the file in the angle brackets vs ""

The top part of the my QT pro file is below.

#-------------------------------------------------
#
# Project created by QtCreator 2013-11-17T14:33:09
#
#-------------------------------------------------

QT       += core gui network serialport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = navstand
TEMPLATE = app

LIBS += -lc -lqwt-qt5 -lm -lmodbus -llabjackusb -lusb-1.0 -lLabJackM
INCLUDEPATH += $(SYSROOT)/usr/include $(SYSROOT)/usr/local/include  $(SYSROOT)/usr/include/qt5 $(SYSROOT)/usr/include/libusb-1.0/ $(SYSROOT)/usr/include/qt5/qwt $(SYSROOT)/usr/lib64

SOURCES += main.cpp \
        command_fm6.cpp \

I can see the .h file at /usr/local/include below

[ken@fedora include]$ ls -al
total 96
drwxr-xr-x. 1 root root    20 Sep  8 22:02 .
drwxr-xr-x. 1 root root    90 Jan 19  2022 ..
-rwxr-xr-x. 1 root root 94786 Sep  8 22:02 LabJackM.h
[ken@fedora include]$ pwd
/usr/local/include

I have no environment variables in my QT project and I have not specifically created environment variable $(SYSROOT) since I don't know where to create it. In this case "I think" the $(SYSROOT) would almost be a blank variable which I have tried setting in the QT environment variable with no success. What should I do to correct my include path here?

Ken

1 Answers

This is very junior mistake. The creator of this driver chose to use caps in the file name and then not use them in the include path. This is fine for windows, fails badly in Linux. Once I removed the capitalization, it worked.

Related