Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
My Carrier: Vodafone

BB10 cascades- no such file or directory issue

In my application I have created two folders for modularity. Whenever I am including the .h files from another folder, I am getting the compilation error like "fatal error: filename.h : No such file or directory ". Please help me regarding this

Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: BB10 cascades- no such file or directory issue

check if the folder is in the pro file (should be added automatically in the current momentics, but you never know)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
My Carrier: Vodafone

Re: BB10 cascades- no such file or directory issue

@Simon, I have added in the following way.

lupdate_inclusion {
SOURCES += \
$$BASEDIR/../src/Networking/*.cpp \
$$BASEDIR/../src/utility/*.cpp \
$$BASEDIR/../assets/*.qml
}
But still I am getting same error. Please let me know if I am doing anything wrong over here.
Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: BB10 cascades- no such file or directory issue

you also need the header files (*.h or *.hpp usually)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
My Carrier: Vodafone

Re: BB10 cascades- no such file or directory issue

Now I have added as follows.

lupdate_inclusion {
SOURCES += \
$$BASEDIR/../src/Networking/*.h \
$$BASEDIR/../src/Networking/*.cpp \
$$BASEDIR/../src/utility/*.h \
$$BASEDIR/../src/utility/*.cpp \
$$BASEDIR/../assets/*.qml
}
But still same issue in the line #include "filename.h"
Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: BB10 cascades- no such file or directory issue

try #include "utility/filename.h"
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: BB10 cascades- no such file or directory issue

Or if you don't want to specify directory name in #include, add the path to both include path and depend path in .pro file:

INCLUDEPATH += utility/
DEPENDPATH += utility/

INCLUDEPATH is used to find header files, DEPENDPATH to automatically recompile files which depend on changed headers.

Clean & rebuild the project after these changes so Makefile is regenerated.

Andrey Fidrya, @zmeyc on twitter
New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
My Carrier: Vodafone

Re: BB10 cascades- no such file or directory issue

Already I tried this one also.But this time the error is "fatal error: utility/filename.h : No such file or directory ".
New Developer
Posts: 44
Registered: ‎06-28-2012
My Device: All
My Carrier: Vodafone

Re: BB10 cascades- no such file or directory issue

After doing many times rebuild and restarting IDE, now I am getting the following error
make: *** [Device-Debug] Error 2 -C/C++ Problem

And also when I goto Run As->Run Configurations->
Here Run button is disabled.
Please help me
Developer
Posts: 16,997
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: BB10 cascades- no such file or directory issue

check the console output above the "error ", it should list a more detailed error description
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter