0

构建 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 请帮忙。谢谢。

4

1 回答 1

0

ActiveTcl 虽然包含运行时库,但省略了 Tcl 和 Tk 库的头文件。它可能还省略了链接库(但我不确定;我不在正确的平台上进行检查)。要构建任何东西,您可能需要从 SourceForge 获取 Tcl 和 Tk的源代码分发(选择 8.5.13 以匹配您的 ActiveTcl 分发)并自己构建它们。但是,一旦构建完成,您就可以针对 ActiveTcl 动态库运行(尤其是在构建代码以使用存根 API 的情况下)。

请注意,除了它提供的额外包和工具之外,ActiveTcl 是一个传统的 Tcl 发行版。

于 2012-12-22T14:18:47.463 回答