I have a .so(for example abc.so) file created using swig in unix which i am abe to load in the tcl program using 'load abc.so'. I plan to run the tcl program in windows, therefore need to create a corresponding abc.dll file which can be loaded similarly. Kindy guide the procedure to achieve this. Thanks!
create .dll in windows for tcl/tk starkit
225 Views Asked by pratik tamakuwala At
1
There are 1 best solutions below
Related Questions in C
- Which XML DTD is Valid
- Hibernate Tools - Not able to add configuration - dom4j connection Timedout -
- How to define dtd element with XOR
- DTD, #REQUIRED, #IMPLIED, Example
- Valid /Validated-Difference (XML,DTD)
- How to set system and public ID without validating or checking DTD?
- '&' inside element not validated by DTD how can i add in DTD to validate
- Why is it very important to specify DTD constraints for an XML document if the latter is treated by a JavaScript file?
- How to make two attributes in XML to be unique (DTD)
- SpringIntegration - disable DTD validation
Related Questions in DLL
- Which XML DTD is Valid
- Hibernate Tools - Not able to add configuration - dom4j connection Timedout -
- How to define dtd element with XOR
- DTD, #REQUIRED, #IMPLIED, Example
- Valid /Validated-Difference (XML,DTD)
- How to set system and public ID without validating or checking DTD?
- '&' inside element not validated by DTD how can i add in DTD to validate
- Why is it very important to specify DTD constraints for an XML document if the latter is treated by a JavaScript file?
- How to make two attributes in XML to be unique (DTD)
- SpringIntegration - disable DTD validation
Related Questions in TCL
- Which XML DTD is Valid
- Hibernate Tools - Not able to add configuration - dom4j connection Timedout -
- How to define dtd element with XOR
- DTD, #REQUIRED, #IMPLIED, Example
- Valid /Validated-Difference (XML,DTD)
- How to set system and public ID without validating or checking DTD?
- '&' inside element not validated by DTD how can i add in DTD to validate
- Why is it very important to specify DTD constraints for an XML document if the latter is treated by a JavaScript file?
- How to make two attributes in XML to be unique (DTD)
- SpringIntegration - disable DTD validation
Related Questions in STARKIT
- Which XML DTD is Valid
- Hibernate Tools - Not able to add configuration - dom4j connection Timedout -
- How to define dtd element with XOR
- DTD, #REQUIRED, #IMPLIED, Example
- Valid /Validated-Difference (XML,DTD)
- How to set system and public ID without validating or checking DTD?
- '&' inside element not validated by DTD how can i add in DTD to validate
- Why is it very important to specify DTD constraints for an XML document if the latter is treated by a JavaScript file?
- How to make two attributes in XML to be unique (DTD)
- SpringIntegration - disable DTD validation
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If you're preparing a Tcl extension in a DLL to go into a starkit, the main thing you need to do is to make sure that the extension is built in stubs enabled mode. There are several parts to this:
You need to define the C symbol
USE_TCL_STUBS
when compiling the code. If you're also using the Tk API — less common, but might be true given your description — you also need to specifyUSE_TK_STUBS
. These symbols are often best specified using compiler options, and specifying them causes Tcl to rewrite virtually all API function calls into stubbed calls.You need to call
Tcl_InitStubs
as the first step of your extension's init function, and if you're using the Tk API then you callTk_InitStubs
as the second step. These two calls initialise the binding of the stubbed API calls so that they point to something real. Note that these API calls are also safe to use when your extension is not built in stubbed mode.You need to link against the Tcl (and possibly the Tk) stubs library, which is a static library. This provides the implementation of the stubbed calls (so that they call into the implementations inside the host Tcl interpreter) and the initialisation function(s).
This is all necessary because in a starkit (just as in many other wrapping technologies) the Tcl API is not implemented by the usual Tcl DLL. Instead, the Tcl code is statically linked into an executable and the name of that executable isn't safely knowable at extension build time; using stubbed calls avoids binding the literal name of the library into your code, and that's the cause of what goes wrong when you don't use stubs.
NB: Only Tcl/Tk extensions can be stub-enabled (unless the code to do the work is duplicated and reused) since the binding mechanism depends on having a Tcl interpreter context to convey the API descriptor structure references to the right places. Non-extension libraries require other, significantly more advanced techniques to work from a packaged environment (and the simplest way of dealing with them is often to bind them statically to a DLL that contains a Tcl extension, virtually always the DLL that contains the relevant Tcl binding layer for making an extension that uses the functionality).