LITERAL_HASH and system() [solved]
-
I'm trying to have qmake generate a header file for me that has some #include statements in it. To do this, I'm using a command of the form:
system(echo $${LITERAL_HASH}include "blahblah.h")
I was very confused why this wasn't working. After playing around with it for a while, I've noticed that if you do the following:
[code]
mystring = "Hello, $${LITERAL_HASH}Goodbye."
message($$mystring)
system(echo $$mystring)
[/code]
then qmake will output:
[quote]
Project MESSAGE: Hello, #Goodbye
Hello,
[/quote]In other words, the entire string is printed to message(), but it is cut off at the hash sign in system(). This seems to me like a bug. Any ideas on a workaround?
-
Hi,
@system(echo "Hello, \$${LITERAL_HASH}Goodbye.")@
starts a comment for bash so it's no executed
-
Good, since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)