User forums > Using Code::Blocks
no such file or directory
dv82xl:
I have a project, the files are listed in the project, when typing #include, the file CLEditDB.h is listed with the other headers in the include folder - the build function errors out - see picture
this wasn't an issue yesterday - the project built without issue
codeblocks edit can see the file - the build cannot
ideas?
p.s. please don't tell me I don't know how to ask a question - if you don't have a helpful answer please stay silent
also: I find it strange that adding a class in codeblocks created the include folder - yet - codeblocks build can't see it
Михаил Агарков:
IIRC the project workspace structure can be different from the actual directory structure of the project.
stahta01:
Post a build log and maybe some can help you. Fail to post a build log and I for one will ignore you!
https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
gd_on:
If I understand how is set your project, you have a file structure like this:
CLEdit
|-src
|- CLEditCF.cpp
|- CLEditDB.cpp
|
|-include
|- CLEditCF.h
|- CLEditDB.h
|
|-CLEditApp.cpp
|-CLEditApp.h
|-CLEditMain.cpp
|-CLEditMain.h
from inside CLEditDB.cpp, you have an #include CLEditDB.h
from inside CLEditMain.h, you have an #include CLEditCF.h
The compiler will find your .h files if you add in your project CLEdit / build options / Search directories / compiler, the path to the "include" folder.
An other solution is to have all your files directly in the root folder CLEdit, but it's not a goob solution for big projects.
dv82xl:
I did as you showed - and it worked!
agree that 'putting all your eggs in one basket' is a bad idea
I started coding on punch cards
sometimes - oftentimes these tools are not very verbose
If I improved CodeBlocks - it wouldn't say 'no such file or directory' especially when it's clearly in the project - I would code the file search engine to recursively look in the project folder
thanks for your help
p.s. CLEdit is going to be a command line editor merging IBM TSO Edit and including the BIM extensions features - it will obliterate vim- which I simply dislike
Navigation
[0] Message Index
[#] Next page
Go to full version