Hi, This works for me in the .pro
DEFINES += SERIAL=\\\"f9a/z\\\" produces: g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DSERIAL=\"f9a/z\" -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:\Qt\Desktop\Qt\4.8.1\mingw32\include\QtCore" -I"d:\Qt\Desktop\Qt\4.8.1\mingw32\include\QtGui" -I"d:\Qt\Desktop\Qt\4.8.1\mingw32\include" -I"d:\Qt\mingw\include\OpenEXR" -I"source" -I"d:\Qt\Desktop\Qt\4.8.1\mingw32\include\ActiveQt" -I"release" -I"." -I"..\CrashTest" -I"." -I"d:\Qt\Desktop\Qt\4.8.1\mingw32\mkspecs\win32-g++" -o release\moc_backgroundfileworker.o release\moc_backgroundfileworker.cpp Etienne 2014/1/23 Soroush Rabiei <soroush.rab...@gmail.com> > I need to pass a string as a definition to my source code which is a > base64 encoded string (so may contain / and "). I'm using qmake and g++. > I've tried so many combinations, but neither works: > > qmake DEFINES+=SERIAL=\\\"f9a/z\\\" > qmake DEFINES+=SERIAL=\"f9a/z\" > qmake DEFINES+="SERIAL=\\"f9a/z\\\"" > > G++ should get the serial like this: > > g++ -DSERIAL=\"f9a/z\" > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest