Overview
| Artifact ID: | 286016c5e10fc48f02726dce99f3388bef52e27e |
|---|---|
| Ticket: | 3097212fffffffffffffffffffffffffffffffff
Linking extension with stubs |
| User & Date: | abhayh on 2010-10-28 09:16:28 |
Changes
- assignee changed to: "mdejong"
- cmimetype changed to: "text/plain"
- comment changed to:
Hi everyone. I am using MS VS 2005 to write a simple TCL extension. Below is my code. #include<tcl.h> #include<iostream> using namespace std; int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv); //ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv) int DLLEXPORT Add_Init(Tcl_Interp *interp) { if(Tcl_InitStubs(interp,"8.4",0)==NULL){ return TCL_ERROR; } if (Tcl_PkgProvide(interp, "add", "1.1") == TCL_ERROR) { return TCL_ERROR; } Tcl_Command Tcl_CreateObjCommand(interp,"add",Add_Nums,NULL,NULL); return TCL_OK; } int Add_Nums (ClientData clientData, Tcl_Interp *interp, int objc, struct Tcl_Obj * CONST * objv) { int adding(int no1,int no2); return TCL_OK; } int adding(int no1,int no2) { int sum =0; cout<<"Enter the two numbers:"<<endl; cin>>no1>>no2; cout<<"Sum is "<<no1+no2<<endl; return(sum); } When i build this , its giving me " Too many Initiallizers " pointing at Tcl_CreateObjCommand() line. How do i resolve this? Thanks - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "abhayh"
- subsystem changed to: "70. Sample Extension"
- title changed to:
"Too many Initiallizers " error with Tcl_CreateObjCommand()
- type changed to: "Bug"