News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Problem including source files from other folders

Started by avestruz, July 13, 2016, 12:31:48 PM

Previous topic - Next topic

avestruz

Hello, I recently moved some files from my current project's folder to a library folder, but now I am not being able to compile it. I deleted the source files from the current project and added them again from the current library folder. They were added without problems, when I call alt+f2 I can see them added in the project tree in their new folder. I then proceeded to change the include that takes care of one file used. I changed it from #include "FileManager.h" to #include "../framework/FileManager.h" However when I try to compile the project I receive:

Quoteerror: ./framework/FileManager.h: No such file or directory|

Besides a lot of
Quoteerror: 'Anything from FileManager' was not declared in this scope

I went to settings, compiler and debugger, Search directories tab, to both compiler and linker tabs and added the pathname to the framework to see if it worked. Nothing.

However, if I add the full pathname in the include, #include "/dir1/dir2/.../.../framework/FileManager.h" I am able to compile without problems.

Apparently my problem is equal to this here: http://forums.next.codeblocks.org/index.php/topic,13709.15.html that ended without a full solution.

On the project's .cbp file, I can see lots of
Quote<Unit filename="../framework/FileManager.cpp" />
which for me seems about right.

So I would appreciate any recommendations to try to solve the matter.

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

oBFusCATed

Quote from: avestruz on July 13, 2016, 12:31:48 PM
However when I try to compile the project I receive:

Quoteerror: ./framework/FileManager.h: No such file or directory|
Is this a copy-paste error or this is the real output of the compiler? I'm talking about ./ instead of ../ in the beginning.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]