+ 10

I am not able to compile codes.

I am using Ubuntu 18.04. From two days I am unable to compile programs earlier it was working perfectly. I am getting the following error : g++ -Wall -fexceptions -g -c /home/night_fury/codes/code::blocks/sum&product/main.cpp -o obj/Debug/main.o /bin/sh: 1: product/main.cpp: not found g++: error: /home/night_fury/codes/code::blocks/sum: No such file or directory g++: fatal error: no input files compilation terminated. Process terminated with status 127 (0 minute(s), 0 second(s)) 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) Please help if anyone know what this is.

17th May 2019, 3:45 PM
Night_fury~
Night_fury~ - avatar
7 ответов
+ 5
Might have to do with the ampersand (&) in sum&product. Rename the folder and try again
17th May 2019, 3:52 PM
Anna
Anna - avatar
+ 10
the problem is with that ampersand only, all other codes are working fine and I made another code now that also worked but only that “sum&product” is giving this error.. I tried with giving space between the words and it worked fine.->”sum & product”. Also I tried it like this “sum\&product” this way it is not even opening the main file. Is this a bug or something ? 🤔
18th May 2019, 7:44 AM
Night_fury~
Night_fury~ - avatar
+ 10
okay thanks for the help Anna
18th May 2019, 8:09 AM
Night_fury~
Night_fury~ - avatar
+ 7
Anna nope it didnt work AgentSmith permission is set to 755 for all files and I never changed location of any file or folder everything is default
18th May 2019, 7:10 AM
Night_fury~
Night_fury~ - avatar
+ 3
Make sure each folder / file is where it should be. Also make sure everything has proper permissions set.
17th May 2019, 4:43 PM
AgentSmith
+ 2
That's weird. I just tried to recreate the error on Ubuntu. When I try to open a file test.dat that is in a directory named "sum&product", the "&" is automatically escaped with "\&": nano sum\&product/test.dat If I remove the "\", it says "file not found".
18th May 2019, 7:25 AM
Anna
Anna - avatar
+ 2
It might be because an unescaped "&" means that you want to run the process in the background or something like that
18th May 2019, 7:57 AM
Anna
Anna - avatar