using pre processor defines in .pro



  • Hi All,
    in my standard makefile project I use some defines to stop some sections of code being built. However I need to translate over to qt and add to my .pro. In my makefile I used

    DDEFS =-DWITH_NONAMESPACES -DWITH_OPENSSL
    
    .....
    
    then 
    all:
    	$(CC) $(CPFLAGS) $(CPPFLAGS) $(DDEFS) $(DINCDIR) $(SOURCE) $(DLIBDIR) -o $(PROGRAM)  $(DLIBDIR) $(LIBS)
    

    How can I do this in qt with .pro? Thanks



  • Should add I've tries

    DEFINES += -DWITH_NONAMESPACES -DWITH_OPENSSL
    

    but get the following errors

    <command-line>:0: error: macro names must be identifiers
    <command-line>:0: error: macro names must be identifiers
    


  • Got it through trial and error, you don''t use -D in qt

    DEFINES += WITH_NONAMESPACES WITH_OPENSSL
    

Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.