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
224 Views Asked by pratik tamakuwala At
1
There are 1 best solutions below
Related Questions in C
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in DLL
- How to find a sequence of bytes on the target program from my injected dll?
- .lib not generated when building DLL project using template class
- The file "spng.dll" is not founded in my Visual Studio's project and i get an error
- Handling Memory Allocation and Pointers in Electron between Node.js and C++ DLL
- Multi level project reference using dll
- Wix MSI Project Harvesting Error Message 'dll is not running' on Build
- Windows Custom Credential Provider is not displaying tile on logon for all users in a pc
- How can I verbosely track the whole process of calling a function?
- Is dll static var shared between threads that load the same dll?
- JNR-FFI - Callback Pointer crash
- How can I patch a function call to a Windows DLL (e.g. kernel32 LoadLibrary)? Is this even possible?
- PyInstaller with PyQt5 Generates "DLL load failed" Error for QtPrintSupport
- What happens if I link two different libraries providing the same symbols in Visual Studio?
- how to test .dll on Linux
- PHP FFI - How to free memory created by FFI::new("void*[2]", false, true)
Related Questions in TCL
- Is there a proper way to "break" out of a switch script and remain in the procedure other than wrapping in a loop?
- Tcl/TK: how to prevent screen tearing?
- Need help on _tkinter.TclError: invalid command name "<!DOCTYPE"
- Is it possible to use function pointers with critcl?
- In Tcl, why do I have to use quotes and curly braces for expr's argument when comparing two string literals?
- What are JCL Alternitives for Embeded Applications?
- sort array of floating point numbers in tcl
- TclOO metaclass classes objects and objdefine
- In Tcl, why is the string length of an empty string 1, not 0?
- exit(EXIT_FAILURE) : the Tcl C API equivalent
- How to decompress the contents of a var to another var?
- namespace ensemble create : limited scope
- why DSR is not working in FANET in NS2 using z=10.0
- anaconda search path ruins tcl package search path
- Tcl package textutil disappeared
Related Questions in STARKIT
- tcl/tk - dependency library issue in multifile starkit
- create .dll in windows for tcl/tk starkit
- Tcl: Include .so file in the starkit
- failed to include tcl package during generating executable with tclkit
- tcl expect creating starpack
- How to prevent sdxkit to unwrap back the TCL source code
- kbskit build for different linux flavours
- Creating kbskit with multiple files (in addition to main.tcl) included
- How to make a starpack like binary for customized tcl intepreter?
- starkit fails to load a pkgIndex.tcl
- Tcl Dev Kit: can't find package starkit
- Is there a way to unwrap a Tclkit packed exe?
- Tcl Starkit that Reads of off a Sqlite Database
- Steps to Create A Tcl Starkit on a Windows Platform
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_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).