Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Link tclsh84s to VC++ application

Status
Not open for further replies.

sad61t

Programmer
Nov 12, 2002
1
GB
Having problems linking the 8.4.0 TCL runtime into our Windows application. Previously using 7.3, and want to update.

Linking ..\tcl8.4.0\Win\Release\tcl84.lib and adding tcl84.dll to output directory works, but there's a problem redirecting stdout. For example, puts "Hello" gives the error:
error writing "stdout": bad file number

The 7.3 build used a static link, and overrides fputs to redirect the output to our GUI. However, linking with ..\tcl8.4.0\Win\Release\tcl84s.lib gives the linker error:
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_DStringInit
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_DeleteInterp
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_DStringFree
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_Eval
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_CommandComplete
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_DStringAppend
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_CreateCommand
CMDLINE.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_CreateInterp
TCLCMD.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_AppendElement
TCLCMD.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_ExprLong
TCLCMD.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_GetInt
TCLCMD.OBJ : error LNK2001: unresolved external symbol __imp__Tcl_SplitList


I've tried wading through the supplied .\win\makefile.vc to find out how the sample tclsh84s.exe program builds, but am none the wiser. What do I need to do to statically link TCL into our application?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top