Is there an replacement for
**/*.*
**/*.cpp
so that i can do sth like this:
gcc -std=c++14 -I ./include/ -o ./bin/main ./src/**/*.cpp
(the way i go when i don't use any makefile)
on windows i did it this way:
gcc -std=c++14 -I include -o bin/main src/main.cpp src/Sth.cpp src/SthEl.cpp
because regular expressions seem not to work or I wasn't able to find a way to make them work...
Could you tell me how to do it on windows?
**
would not be a regular expression as it's a quantifier and quantifying "any number of items any number of items" doesn't make a whole lot of sense. On Windows you could usesrc/*.cpp
. What you're missing is a wildcards to mean "every cpp file in every directory". Usually you would use a script for that. In this case you could use a PowerShell script that collects the files and builds a string which you could use as the parameter for GCC.ls ./[a-Z]{4}/.*
it doesn't meet the technical definition of a regular expression and the**
would still be a violation/nonsense of what's usually accepted as a regular expression in technical systems. In addition in myls
example you probably would need to escape the first dot to make it a literal rather than any character.