Author Topic: Object File No such file or directory  (Read 2087 times)

Offline jimctr

  • Single posting newcomer
  • *
  • Posts: 2
Object File No such file or directory
« 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))



Online stahta01

  • Lives here!
  • ****
  • Posts: 6794
    • My Best Post
Re: Object File No such file or directory
« Reply #1 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

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

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline jimctr

  • Single posting newcomer
  • *
  • Posts: 2
Re: Object File No such file or directory
« Reply #2 on: October 12, 2016, 05:06:48 pm »
OK, Thanks, I have it working now

Offline ArakelTheDragon

  • Single posting newcomer
  • *
  • Posts: 4
Re: Object File No such file or directory
« Reply #3 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.

« Last Edit: March 07, 2020, 11:45:28 pm by ArakelTheDragon »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12321
    • Travis build status
Re: Object File No such file or directory
« Reply #4 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.
(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!]