0
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?
2For a start you're not using a regular expression but regular wildcards.
**
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. – Seth – 2016-10-17T11:01:01.683Naja indirekt ist auch * ein regulärer Ausdruck, da die Sprache die genau Sigma* akzeptiert damit impliziert wird. – baxbear – 2016-10-17T11:56:31.717
If you feel happy with that definition it's fine. But if you're not able to do
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. – Seth – 2016-10-17T13:02:31.373