Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jimctr on October 11, 2016, 05:35:56 pm

Title: Object File No such file or directory
Post by: jimctr on October 11, 2016, 05:35:56 pm
Downloaded codeblocks-16.01mingw-setup.exe.  Ran Installation.  Created a C++ project.  And tried to build the simple "Hello World" program provided using GNU GCC compiler, but project provided won't build with:

mingw32-g++.exe -Wall -fexceptions -g -std=c++11 -I"C:\Program Files (x86)\CodeBlocks\MinGW\libexec\gcc\mingw32\4.9.2\" -c "C:\Cpp Tutorials\CppTutorials\main.cpp" -o obj\Debug\main.o

mingw32-g++.exe: error: Tutorials\CppTutorials\main.cpp -o obj\Debug\main.o: No such file or directory
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))


Title: Re: Object File No such file or directory
Post by: stahta01 on October 11, 2016, 07:11:55 pm
Please post a full rebuild log in code tags! http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Try NOT using spaces in project path. I am guessing that you did so.

Tim S.
Title: Re: Object File No such file or directory
Post by: jimctr on October 12, 2016, 05:06:48 pm
OK, Thanks, I have it working now
Title: Re: Object File No such file or directory
Post by: ArakelTheDragon on March 07, 2020, 11:35:22 pm
Good day!

Sorry for bumping an old thread, please post the solution because some of us have the same problem.

The solution is to remove the file from the sources folder and from your code if you have an "#include file" or a function of it.

Title: Re: Object File No such file or directory
Post by: oBFusCATed on March 08, 2020, 12:58:52 am
ArakelTheDragon: You don't have the same problem. From the log it seems that you have antivirus software which is deleting your final executable. If this is the case teach it to not do so an all would be fine.