Hi.
I create a C project which contains a "A.c" file with main() function, a "B.c" file that contains a function I want to call from main(),and a header file B.h (which I create through new_source_file->...->..save_as_header..)that contains the prototype of the function.All three files and project are in the same folder.
In the A.c file I include the header file as : #include "B.h".
When compiling I get the message:"B.h:No such file or directory".
The same happens when, without including the header file, I declare the function above main(as: extern (type) function() ).
Both shouldn't working fine?
I must doing something wrong but I can't see it :).
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you mean you placed your header file in c:\dev-cpp\bin, then your solution is probably ill advised - how are you going to resonably manage a project of any signofocant size that way!?
It should have worked the way you described in the first place, so you obviously have something wrong. We could have determined what was going on and probably what was wrong had you posted the full compile log as requested in the "PLEASE READ BEFORE POSTING A QUESTION" thread.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.
I create a C project which contains a "A.c" file with main() function, a "B.c" file that contains a function I want to call from main(),and a header file B.h (which I create through new_source_file->...->..save_as_header..)that contains the prototype of the function.All three files and project are in the same folder.
In the A.c file I include the header file as : #include "B.h".
When compiling I get the message:"B.h:No such file or directory".
The same happens when, without including the header file, I declare the function above main(as: extern (type) function() ).
Both shouldn't working fine?
I must doing something wrong but I can't see it :).
Thanks in advance.
If you mean you placed your header file in c:\dev-cpp\bin, then your solution is probably ill advised - how are you going to resonably manage a project of any signofocant size that way!?
It should have worked the way you described in the first place, so you obviously have something wrong. We could have determined what was going on and probably what was wrong had you posted the full compile log as requested in the "PLEASE READ BEFORE POSTING A QUESTION" thread.
Clifford
Ok and sorry.I placed the header file where the path indicates and works fine.