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
223 Views Asked by pratik tamakuwala At
1
There are 1 best solutions below
Related Questions in C
- Passing arguments to main in C using Eclipse
- kernel module does not print packet info
- error C2016 (C requires that a struct or union has at least one member) and structs typedefs
- Drawing with ncurses, sockets and fork
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- Configured TTL for A record(s) backing CNAME records
- Allocating memory for pointers inside structures in functions
- Finding articulation point of undirected graph by DFS
- C first fgets() is being skipped while the second runs
- C std library don't appear to be linked in object file
- gcc static library compilation
- How to do a case-insensitive string comparison?
- C programming: Create and write 2D array of files as function
- How to read a file then store to array and then print?
- Function timeouts in C and thread
Related Questions in DLL
- C++ using std::vector across boundaries
- Linking to a static lib compiled with MSVC
- What are MATLAB DLLS?
- VC++ .net: Functionality from managed DLL is not exported
- DLL being marked as DELETEPENDING
- ASP.NET Web Forms give error while connecting to Oracle 11g
- Air Native Extensions: Released Air App w/Windows Native Extension works fine on develpment PC but not on other computers
- WiX and custom extensions for primary output?
- Using different versions of the same DLL in a project
- visual c++ - missing unrelated DLLs
- Error executing SSIS Package
- C++ Access violation write to 0x00000000 in dll in mql4
- How can I read embedded .resx in different assembly
- Running two versions of same Dll parallel in Asp.Net
- Call class member of c++ DLL from c#
Related Questions in TCL
- Missing title bar when using wm manage and wm forget
- Questions on Regex algorithm (not necessarily EXPECT related)
- format in TCL in not working correctly
- Pick out certain lines from files
- Non-Greedy regex acts greedy based on the position of atoms in regex
- how to install Expect for windows using ActiveTCL 8.6 x86
- How to change link color in NS2?
- fconfigure refuses to set baud rate to 921600
- Search file by placement of element in a line
- Returning Some Variable from a "proc" in Tcl
- What is TCL's pattern for translating GUI actions to TCL statements
- Is the Tcl `file dirname` command usable for URL?
- synopsys dc_shell get_attribute number of digits
- Search for element after a designated string
- Using $variable in Parenthesis in Tcl (proc)
Related Questions in STARKIT
- create .dll in windows for tcl/tk starkit
- tcl expect creating starpack
- Steps to Create A Tcl Starkit on a Windows Platform
- Tcl Starkit that Reads of off a Sqlite Database
- tcl/tk - dependency library issue in multifile starkit
- How to make a starpack like binary for customized tcl intepreter?
- Tcl: Include .so file in the starkit
- Is there a way to unwrap a Tclkit packed exe?
- Tcl Dev Kit: can't find package starkit
- starkit fails to load a pkgIndex.tcl
- failed to include tcl package during generating executable with tclkit
- Creating kbskit with multiple files (in addition to main.tcl) included
- How to prevent sdxkit to unwrap back the TCL source code
- kbskit build for different linux flavours
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 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_STUBSwhen 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_InitStubsas the first step of your extension's init function, and if you're using the Tk API then you callTk_InitStubsas 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).