TCL/TK에 manually from sources하거나 install it from ActiveState 당신이 당신의 TCL/TK에 설치 폴더에 다음과 같은 구조를 얻을 : 당신은 DLL의를 당신의 일부 응용 프로그램을 컴파일하고 TCL에 연결하고 TK DLL의 그 그래서TCL과 TK에게 어떻게 기본 '.tcl` 언어 파일을 로컬에서 검색해야하는지 알려주고 싶습니다. 컴파일
+- bin
+- tcl85.dll
+- tk85.dll
//...
+- lib/
+- tcl8.5/
//All TCL files (.tcl)
+- tk8.5/
//All TK files (.tcl)
//...
tham (DLL의) 디렉토리 ../lib/tk8.5 및 ../lib/tcl8.5와 관련된 모든 TCL/TK 파일을 검색합니다. 따라서 최종 사용자가 TCL 및 TK를 설치하지 않아도되므로 앱을 배포하는 것이 매우 어렵습니다.
내 C++ 응용 프로그램을 배포하고 싶습니다.
기본 GUI 레이아웃에 CPPTK을 사용합니다.
최종 사용자가 TCL 및 TK를 설치할 필요가 없도록 가능하게 만들고 싶습니다. 나는 그들에게 extras/TCL
과 extras/TK
과 같은 내 디렉터리에있는 TK와 TCL .TCL
소스 파일을 폴더에 제공하려고한다. 해당 소스 파일 폴더가있는 TK 및 TCL DLL을 어떻게 알 수 있습니까? 그 일을하기 위해 TK 및 TCL API 함수 이름은 무엇입니까? 거기에 특별한 cpptk 기능이 있습니까?
업데이트 그래서 나는 다음 폴더 구조와 Donal Fellows answer를 시도했다. 그것은 cpptkbase.cc 라인 (36)에도 실패한 제외한 컴파일
#include <stdio.h>
#include "cpptk/cpptk.h"
using namespace Tk;
int main(int, char *argv[])
{
static char* str = "set extrasDir [file dirname [info nameofexecutable]]/extras\n"
"# Now use it to load some code...\n"
"source $extrasDir/tcl/init.tcl\n"
"# Another way to load code, using all *.tk files from a directory:\n"
"foreach tkFile [glob -nocomplain -directory $extrasDir/tk *.tk] {\n"
" source $tkFile\n"
"}\n";
// This next part is in a function or method...
//std::string script("the script to evaluate goes here");
std::string result = Tk::details::Expr(str,true); // I think this is correct
std::cout<< result << std::endl;
std::cin.get();
Tk::init(argv[0]);
button(".b") -text("Say Hello");
pack(".b") -padx(20) -pady(6);
Tk::runEventLoop();
std::cin.get();
}
BTW : 같은
app/
+- app.exe
+- tcl85.dll
+- tk85.dll
+- extras/
+- tcl/
//All TCL files you can find in TCL install folder/ lib/tcl8.5
+- tk/
//All TK files you can find in TCL install folder/ lib/tk8.5
내 코드는 모습이 들어있는 디렉토리가 있다면 나는 this html\js app to get char string.
이 질문에 'c'태그가 붙은 이유는 무엇입니까? –
Tcl과 TK에는 C++에서 사용하는 C++가 있습니다. – Rella
하지만 C++에 관한 질문입니다. –