我有一个需要与我的应用程序链接的库。代码是用Visual Studio 2015编写的,我没有库的源代码。一家公司向我提供了将库编译到我的应用程序中,以便我可以与他们的硬件进行交互。
添加头文件时,intellisense会给我一堆错误。 see this image
这里真的需要一些帮助。
以下是我已完成的一些配置。
C:\Users\liang\Documents\Visual Studio 2015\Projects\Safebox\Lib
/ OUT:" C:\ Users \ liang \ Documents \ Visual Studio 2015 \ Projects \ Safebox \ Win32 \ Debug \ Safebox.exe" / MANIFEST / NXCOMPAT / PDB:" C:\ Users \ liang \ Documents \ Visual Studio 2015 \ Projects \ Safebox \ Win32 \ Debug \ Safebox.pdb" / DYNAMICBASE" qtmaind.lib" " Qt5Cored.lib" " Qt5Guid.lib" " Qt5Sqld.lib" " Qt5Widgetsd.lib" " GmpcFnc.lib" " KERNEL32.LIB" " USER32.LIB" " GDI32.LIB" " winspool.lib" " comdlg32.lib" " advapi32.lib" " SHELL32.LIB" " ole32.lib" " oleaut32.lib" " UUID.LIB" " odbc32.lib" " odbccp32.lib" / MACHINE:X86 / SAFESEH / PGD:" C:\ Users \ liang \ Documents \ Visual Studio 2015 \ Projects \ Safebox \ Win32 \ Debug \ Safebox.pgd" / SUBSYSTEM:WINDOWS / MANIFESTUAC:" level =' asInvoker' uiAccess ='假'" /ManifestFile:"Debug\Safebox.exe.intermediate.manifest" / ERRORREPORT:PROMPT / NOLOGO /LIBPATH:"D:\Qt\Qt5.6.0\5.6\msvc2015\lib" / LIBPATH:" C:\ Users \ liang \ Documents \ Visual Studio 2015 \ Projects \ Safebox \ Lib" / TLBID:1
C:\Users\liang\Documents\Visual Studio 2015\Projects\
/ GS / analyze- / W1 / Zc:wchar_t /I"。\GeneratedFiles" /I"." /I"D:\Qt\Qt5.6.0\5.6\msvc2015\include" /I".\GeneratedFiles\Debug" /I"D:\Qt\Qt5.6.0\5.6\msvc2015\include\QtCore" /I"D:\Qt\Qt5.6.0\5.6\msvc2015\include\QtGui" /I"D:\Qt\Qt5.6.0\5.6\msvc2015\include\QtSql" /I"D:\Qt\Qt5.6.0\5.6\msvc2015\include\QtPrintSupport" /I"D:\Qt\Qt5.6.0\5.6\msvc2015\include\QtWidgets" / I" ** C:\ Users \ liang \ Documents \ Visual Studio 2015 \ Projects **" / Zi / Gm- / Od /Fd"Debug\vc140.pdb" / Zc:inline / fp:exact / D" UNICODE" / D" WIN32" / D" QT_DLL" / D" QT_CORE_LIB" / D" QT_GUI_LIB" / D" QT_SQL_LIB" / D" QT_PRINTSUPPORT_LIB" / D" QT_WIDGETS_LIB" / errorReport:prompt / WX- / Zc:forScope / Gd / Oy- / MDd / Fa" Debug \" / EHsc / nologo / Fo" Debug \" /Fp"Debug\Safebox.pch"
4.并添加了头文件
#include "../Include/GmpcFnc.h"
谢谢!
答案 0 :(得分:0)
我找到了解决方案,这个库是在2006〜2008年制作的,不包括库,在添加Windows.h后,一切正常。