Results 1 to 5 of 5

Thread: No such file or directory- Simple Link Error Help?

  1. #1
    Join Date
    Feb 2010
    Location
    London
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question No such file or directory- Simple Link Error Help?

    Here are the first few lines of my *.h file:

    Qt Code:
    1. #ifndef PHYSICSLIB_H
    2. #define PHYSICSLIB_H
    3.  
    4. #pragma once
    5.  
    6. #include "Core/element.h"
    7. #include "Core/parameters.h"
    8. #include "Core/smartPointer.h"
    9.  
    10. #include "Relationships/relationships.h"
    11. #include "Relationships/oneWay.h"
    12. #include "Relationships/twoWay.h"
    13. #include "Relationships/hit.h"
    14.  
    15. #include "Callbacks/elementDrawer.h"
    16. #include "Callbacks/elementUpdater.h"
    To copy to clipboard, switch view to plain text mode 

    After trying to build, the compile output reads:

    Starting: c:/qt/2010.01/qt/bin/qmake.exe X:/Cerulean_/Cerulean_.pro -spec win32-g++ -r
    Exited with code 0.
    Starting: C:/Qt/2010.01/mingw/bin/mingw32-make.exe -w
    mingw32-make: Entering directory `X:/Cerulean_'
    C:/Qt/2010.01/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `X:/Cerulean_'
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\Qt\2010.01\qt\include\QtCore" -I"c:\Qt\2010.01\qt\include\QtGui" -I"c:\Qt\2010.01\qt\include\QtOpenGL" -I"c:\Qt\2010.01\qt\include" -I"c:\Qt\2010.01\qt\include\ActiveQt" -I"debug" -I"c:\Qt\2010.01\qt\mkspecs\win32-g++" -o debug\physicsLib.o Core\physicsLib.cpp
    mingw32-make[1]: Leaving directory `X:/Cerulean_'
    mingw32-make: Leaving directory `X:/Cerulean_'

    In file included from Core\physicsLib.cpp:25:
    Core\/physicsLib.h:29:26: error: Core/element.h: No such file or directory
    Core\/physicsLib.h:30:29: error: Core/parameters.h: No such file or directory
    Core\/physicsLib.h:31:31: error: Core/smartPointer.h: No such file or directory
    Core\/physicsLib.h:33:41: error: Relationships/relationships.h: No such file or directory
    Core\/physicsLib.h:34:34: error: Relationships/oneWay.h: No such file or directory
    Core\/physicsLib.h:35:34: error: Relationships/twoWay.h: No such file or directory
    Core\/physicsLib.h:36:31: error: Relationships/hit.h: No such file or directory
    Core\/physicsLib.h:38:37: error: Callbacks/elementDrawer.h: No such file or directory
    Core\/physicsLib.h:39:38: error: Callbacks/elementUpdater.h: No such file or directory

    ... followed by more errors relating to these above includ errors.

    In the *.pro file I have:
    QT += opengl
    SOURCES += main.cpp \
    mainwindow.cpp \
    glwidget.cpp \
    Core/smartPointer.cpp \
    Core/physicsLib.cpp \
    Core/physics.cpp \
    Core/element.cpp \
    Core/boundingBox.cpp
    HEADERS += glwidget.h \
    mainwindow.h \
    Core/utilities.h \
    Core/smartPointer.h \
    Core/physicsLib.h \
    Core/parameters.h \
    Core/element.h \
    Core/boundingBox.h \
    Callbacks/elementUpdater.h \
    Callbacks/elementDrawer.h \
    Relationships/types.h \
    Relationships/twoWay.h \
    Relationships/relationships.h \
    Relationships/oneWay.h \
    Relationships/hit.h

    I'm not sure why these files aren't being recognized: I know it's probably just a simple linking error... any advice would be appriciated. Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: No such file or directory- Simple Link Error Help?

    in Core/physicsLib.h you have to write
    Qt Code:
    1. #include "element.h"
    To copy to clipboard, switch view to plain text mode 
    not
    Qt Code:
    1. #include "Core/element.h"
    To copy to clipboard, switch view to plain text mode 
    etc.

  3. #3
    Join Date
    Feb 2010
    Location
    London
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: No such file or directory- Simple Link Error Help?

    I tried that and the same errors occured.

    Any other suggestions?

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: No such file or directory- Simple Link Error Help?

    try to use an explicit INCLUDEPATH in your pro file.

  5. #5
    Join Date
    Feb 2010
    Location
    London
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: No such file or directory- Simple Link Error Help?

    I added
    Qt Code:
    1. INCLUDEPATH += -I"x:\Cerulean_\Core\element.h"
    To copy to clipboard, switch view to plain text mode 
    and so on... to the .pro file but still get the same error:

    Core/element.h: No such file or directory

    I haven't done any explicit INCLUDEPATH before so I'm not sure if I got it right yet and couldn't tell from the online help stating:

    -I <string> ........ Add an explicit include path.

    Thanks for your help.

Similar Threads

  1. Replies: 11
    Last Post: 1st February 2018, 04:27
  2. Replies: 0
    Last Post: 10th February 2010, 07:07
  3. Replies: 1
    Last Post: 27th March 2009, 06:22
  4. Replies: 4
    Last Post: 24th November 2007, 13:33
  5. Replies: 1
    Last Post: 10th July 2007, 16:53

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.