I do not understand, why the binary have to be in the “src”-folder and have to been startet from a different level. I’m afraid I’m making some fundamental mistake.
I do not understand, why the binary have to be in the “src”-folder and have to been startet from a different level. I’m afraid I’m making some fundamental mistake.
In order to run it you need to type:
./main
Short-hand example with an example structure from my point of view:
yes. on *nix systems the current directory is not included in the search path.
if you are curious, you can show the searchpath with echo $PATH
if you want to run something, it needs to be in a directory in the path, or you specify the location relative to your current directory, or the full path.
if the executable is in the current directory (assuming mf/)
./main
~/mf/main
if it is in the src folder and you are in the mf folder:
src/main
./src/main
Or globally whereever you are:
~/mf/src/main
The “~/” is substituted by the shell for your home directory and is a shorthand for /home//.