Login Page - Create Account

Support Board


Date/Time: Sat, 27 Jul 2024 04:48:22 +0000



Post From: fatal error: defs.cpp: No such file or directory

[2023-08-19 12:36:18]
User286186 - Posts: 21
Hello, Since I am trying to modularize my code, I want to #include a "defs.cpp" file with some functions in order to use them in my main "modularCode.cpp" ACS.
I compile "defs.cpp" file without any problem.

The problem is triggered when a fatal compilation error arise as I try to compile the main "modularCode.cpp" file that #include "defs.cpp".

modularCode.cpp:3:10: fatal error: defs.cpp: No such file or directory
3 | #include "defs.cpp"
| ^~~~~~~~~~
compilation terminated.

Both files are in the correct folder (ACS_Source) as any other file which is included in my "modularCode.cpp" (for instance, no problem including sierrachart.h or scstructures.h).

Could you please help me ?

Thank you !