Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 22484

How can I replace forward slash with backslash in a variable in a qmake .pro file?

$
0
0

In a .pro file, I am trying to replace the forward slashes in, e.g., the PWD variable, with backslashes. I am working in Qt Creator on Windows.

The following code will correctly replace the D drive with the C drive:

currdir = $$PWDcurrdir ~= s/D:/C:/

The following code gives an error that "the s/// function expects 3 or 4 arguments"

currdir = $$PWDcurrdir ~= s/\//\\/

Viewing all articles
Browse latest Browse all 22484

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>