构建KWWidget时发生以下错误:
3>vtkKWApplicationTcl.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWTkTreeCtrlInit.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>tkShape.cpp
3>..\KWWidgets-HEAD-cvs\Utilities\tkdnd\win\tkShape.cpp(13) : error C2061: syntax error : identifier 'Tcl_Obj'
3>..\KWWidgets-HEAD-cvs\Utilities\tkdnd\win\tkShape.cpp(16) : error C2065: 'objv' : undeclared identifier
3>..\KWWidgets-HEAD-cvs\Utilities\tkdnd\win\tkShape.cpp(16) : error C3861: 'Tcl_WrongNumArgs': identifier not found
3>..\KWWidgets-HEAD-cvs\Utilities\tkdnd\win\tkShape.cpp(24) : error C3861: 'Tcl_CreateObjCommand': identifier not found
3>..\KWWidgets-HEAD-cvs\Utilities\tkdnd\win\tkShape.cpp(27) : error C3861: 'Tcl_PkgProvide': identifier not found
3>tkOleDND.cpp
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>OleDND.cpp
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWTkDnDInit.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>tkDNDBind.cpp
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>tkDND.cpp
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWTkconInit.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWTablelistInit.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWBWidgetsInit.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWWidgetsInitializeCommand.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWSimpleAnimationWidget.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWSelectionFrameLayoutManager.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWRenderWidget.cxx
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(353) : error C2143: syntax error : missing ';' before '*'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(353) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(353) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(353) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(353) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(389) : error C2146: syntax error : missing ';' before identifier 'LPTCH'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(389) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(389) : error C2378: 'LPCH' : redefinition; symbol cannot be overloaded with a typedef
3> C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(353) : see declaration of 'LPCH'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(389) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(389) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(398) : error C2143: syntax error : missing ';' before '*'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(398) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(398) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(399) : error C2143: syntax error : missing ';' before '*'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(399) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(399) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3422) : error C2143: syntax error : missing ';' before '__stdcall'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3422) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3422) : error C2040: 'LPCH' : 'int' differs in levels of indirection from 'int *'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3425) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3447) : error C2146: syntax error : missing ')' before identifier 'NewEnvironment'
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3447) : warning C4229: anachronism used : modifiers on data are ignored
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3447) : error C2491: 'SetEnvironmentStringsA' : definition of dllimport data not allowed
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3447) : error C2440: 'initializing' : cannot convert from 'int *' to 'BOOL'
3> There is no context in which this conversion is possible
3>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winbase.h(3447) : error C2059: syntax error : ')'
3>Compiling...
3>vtkKWPresetSelector.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWPopupButton.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWOptionDataBase.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWObject.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
3>vtkKWMultiColumnList.cxx
3>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
.
.
24>Linking...
24>LINK : fatal error LNK1104: cannot open file '..\bin\Debug\KWWidgets.lib'
24>Build log was saved at "file://d:\KWWidget\bin\Utilities\KWConvertImageToHeader.dir\Debug\BuildLog.htm"
24>KWConvertImageToHeader - 1 error(s), 0 warning(s)
25>------ Build started: Project: KWFileBrowserDialogExample, Configuration: Debug Win32 ------
25>Compiling...
25>KWFileBrowserDialogExample.cxx
25>D:\VTK\src\Common\vtkTk.h(26) : fatal error C1083: Cannot open include file: 'tk.h': No such file or directory
25>Build log was saved at "file://d:\KWWidget\bin\Examples\Cxx\FileBrowserDialog\KWFileBrowserDialogExample.dir\Debug\BuildLog.htm"
25>KWFileBrowserDialogExample - 1 error(s), 0 warning(s)
26>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
26>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 20 failed, 3 up-to-date, 6 skipped ==========
我已经安装了ActiveTcl8.5.13.0.296436-win32-ix86-threaded和TclDevKit5.3.0.295349-win32-ix86-threaded但是找不到tk.h请帮忙。 感谢。
答案 0 :(得分:0)
ActiveTcl虽然包含运行时库,但省略了Tcl和Tk库的头文件。它可能也省略了链接库(但我不确定;我没有在正确的平台上检查)。要构建任何东西,你可能需要从SourceForge获取Tcl和Tk的the source distributions(选择8.5.13以匹配你的ActiveTcl发行版)并自己构建它们。但是,一旦构建完成,您就可以针对ActiveTcl动态库运行(特别是如果您构建了使用存根API的代码)。
请注意,ActiveTcl除了提供额外的软件包和工具外,还有传统的Tcl发行版。