Take the 2-minute tour ×

QT gives the errors

LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library

where do I put the /NODEFAULTLIB:library ?

share|improve this question
possible duplicate of Resolving LNK4098: defaultlib 'MSVCRT' conflicts with –  Mgetz Jun 28 '13 at 18:39
@Mgetz Where do i put /NODEFAULTLIB:library ? –  rreeves Jun 28 '13 at 18:47
there is an ignore default libraries setting under the linker settings –  Mgetz Jun 28 '13 at 18:47
This might be covered in the Qt FAQs. But if you need to add compiler options, here's how –  Huytard Jun 28 '13 at 19:15
You didn't spell the library name correctly, fyi –  Huytard Jun 28 '13 at 20:58
show 3 more comments

2 Answers

Some one with your very issue posted something on the Qt forums a while back.

Which sounds like passing in one of the additional options should help.

So in your .pro file:

// This

// Or that

And don't forget to run qmake to make sure the makefile arguments absorb the changes made to the .pro file.

share|improve this answer
thanks for the help! this didn't work out it helped me figure it out. –  rreeves Jun 28 '13 at 23:00
add comment
up vote 2 down vote accepted

As far as I can tell this is a undocumented feature, but this is where you put it in QT Creator 2.6.2 w/ QT 4.8.4 (in the .pro file)

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../LIBRARYNAME/Lib/ -lLIBRARY /NODEFAULTLIB:library
share|improve this answer
it's not an undocumented feature as much as it is simply a "less obvious way" of passing additional arguments to the compiler/makefile -- but congrats anyway! –  Huytard Jun 28 '13 at 23:03
add comment

Your Answer


