[Qt-interest] CONFIG(debug, debug|release) fails

Matthias Pospiech matthias.pospiech at gmx.de
Sun Jan 31 00:46:00 CET 2010


David Ching schrieb:
> Anyway:  try deleting the qmake generated makefiles and try again.
>   
I got so far that the code works for release or debug alone.
However for debug_and_release mode only debug is build, bug again with 
the wrong name,
and the library is not build because it fails to link

        link /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:CONSOLE /MANIFEST 
/MANIFESTFILE:
"release\source-highlight.intermediate.manifest" /VERSION:3.01 
/OUT:..\bin\sourc
e-highlight.exe @C:\Users\Matthias\AppData\Local\Temp\nm21A8.tmp
LINK : fatal error LNK1104: cannot open file 
'libboost_regex-vc80-mt-1_41.lib'

which I posted in the other thread already.


The code I use is:


win32{
    CONFIG           -= debug
    CONFIG           -= release
    CONFIG           += debug_and_release
    CONFIG           += build_all
}

LIBRARY_NAME = source-highlight

CONFIG(debug, debug|release) {
  win32:LIBRARY_NAME = $$join(LIBRARY_NAME,,,d)
}

DEV_LIB_PATH = C:\Users\Matthias\Documents\SVN\Library

CONFIG(debug, debug|release) {
        win32-msvc2005 {
            BOOST_LIB_PATH = 
$${DEV_LIB_PATH}\lib\msvc-2005\boost\regex\debug
            BOOST_LIBRARIES = -L$${BOOST_LIB_PATH} 
-llibboost_regex-vc80-mt-gd-1_41
        }
}

CONFIG(release, debug|release) {
       win32-msvc2005 {
            BOOST_LIB_PATH = 
$${DEV_LIB_PATH}\lib\msvc-2005\boost\regex\release
            BOOST_LIBRARIES = -L$${BOOST_LIB_PATH} 
-llibboost_regex-vc80-mt-1_41
        }
}

ADDITIONAL_LIBRARIES += $${BOOST_LIBRARIES}

LIBS += $$ADDITIONAL_LIBRARIES

message(Libraries      :  $$LIBS)
message(Config         :  $$CONFIG)
message(Library Name   :  $${LIBRARY_NAME})


For debug_and_release $$LIBS is empty and the name is 'source-highlight'.

I read the qmake manual, but do not see what else I could change

Matthias




More information about the Qt-interest-old mailing list