-1

我是 Qt 的新手。我有一个供应商提供的应用程序,我正在尝试构建我的应用程序,

我收到以下错误,我花了几个小时来解决这个错误,我提到的解决方案似乎都没有解决我的问题

moc_mainwindow.cpp

e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(268) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(270) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(311) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdio.h(366) : see declaration of 'sprintf'
e:\installed softwares\msvc2008\vc\include\xsens\xsexception.h(48) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdio.h(366) : see declaration of 'sprintf'
moc_myxda.cpp
sktop\Qt\4.8.1\msvc2008\include\ActiveQt" -I"debug" -I"." -I"..\awindamonitor" -I"." -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008" -D_MSC_VER=1500 -DWIN32 ..\awindamonitor\measurementstarter.h -o debug\moc_measurementstarter.cpp
    e:\MoCap\QT\Desktop\Qt\4.8.1\msvc2008\bin\rcc.exe -name awindamonitor ..\awindamonitor\awindamonitor.qrc -o debug\qrc_awindamonitor.cpp
    rc -D_DEBUG -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -fo debug\icon.res ..\awindamonitor\icon.rc
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtCore" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtGui" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include" -I"E:\MoCap\MTW SDK 4.1.5\GUI\awindamonitor\..\..\Win32\include" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\ActiveQt" -I"debug" -I"." -I"..\awindamonitor" -I"." -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\ASUS\AppData\Local\Temp\moc_mainwindow.obj.5008.546.jom
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtCore" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtGui" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include" -I"E:\MoCap\MTW SDK 4.1.5\GUI\awindamonitor\..\..\Win32\include" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\ActiveQt" -I"debug" -I"." -I"..\awindamonitor" -I"." -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\ASUS\AppData\Local\Temp\moc_myxda.obj.5008.3261.jom
connectedmtwdata.cpp
measurementstarter.cpp
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(268) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(270) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(311) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdio.h(366) : see declaration of 'sprintf'
Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtCore" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtGui" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include" -I"E:\MoCap\MTW SDK 4.1.5\GUI\awindamonitor\..\..\Win32\include" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\ActiveQt" -I"debug" -I"." -I"..\awindamonitor" -I"." -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\ASUS\AppData\Local\Temp\moc_measurementstarter.obj.5008.3261.jom
myxda.cpp
serialkey.cpp
Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_        1 file(s) copied.
        1 file(s) copied.
The system cannot find the path specified.
MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtCore" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\QtGui" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include" -I"E:\MoCap\MTW SDK 4.1.5\GUI\awindamonitor\..\..\Win32\include" -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\include\ActiveQt" -I"debug" -I"." -I"..\awindamonitor" -I"." -I"..\..\..\QT\Desktop\Qt\4.8.1\msvc2008\mkspecs\win32-msvc2008" -Fodebug\ @C:\Users\ASUS\AppData\Local\Temp\qrc_awindamonitor.obj.5008.4134.jom
qrc_awindamonitor.cpp
moc_measurementstarter.cpp
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(268) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(270) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(311) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdio.h(366) : see declaration of 'sprintf'
main.cpp
mainwindow.cpp
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(268) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(270) : warning C4996: 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdlib.h(499) : see declaration of 'mbstowcs'
e:\installed softwares\msvc2008\vc\include\xsens\xsstring.h(311) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdio.h(366) : see declaration of 'sprintf'
e:\installed softwares\msvc2008\vc\include\xsens\xsexception.h(48) : warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Installed Softwares\MSVC2008\VC\INCLUDE\stdio.h(366) : see declaration of 'sprintf'
4

1 回答 1

0

添加-D _CRT_SECURE_NO_WARNINGS到您的编译器标志以避免在 3rd 方库代码(例如 Qt)中出现警告。

如果您控制的代码代码是警告的来源,请解决问题。该警告会告诉您确切的操作。

将调用替换为sprintf调用sprintf_s等。

于 2013-09-27T15:46:37.730 回答