I've bought a wonderful audio library from CricketTechnology with source. I cannot dump ck.lib with tDump64 and also tLib64 doesn't work for me. But windows LIB lists the content of ck.lib and can probably extract the .obj files. My idea is to extract all the .obj files listed and to repackage them with tLib. Is there a tool? I want to use the wonderful library with Delphi and have added some functions to the source code that are free from C++-objects.
Related
I'm trying to use a static library in my C++ Builder project. The lib is created by using DCC32 to compile Delphi source code with -JL option. My Delphi source code is design as a "Designtime and runtime" package, which mean s all the code is built into one package. I want to know how can I use this static library in our C++ Builder project? Thanks in advance.
As David said, the Delphi compiler can't create static lib files at all. What you are trying to link to is an import library for a designtime/runtime package.
Delphi (and C++Builder) packages are not static libs, they are DLLs with a lot of extra information onboard, which makes it easy for Delphi and C++Builder code to link to them and the types inside. They are more or less equivalent to C# assemblies (guess where the C# people got the idea ;-).
To use such a package, in case you really want to use them, select the "build with packages" option from the project options and select this package too.
But if you want to create a single, standalone application, you don't build with packages and the Pascal files get linked into your application as if they came from a static library. But instead of specifying one lib file, you simply specify the .pas files in the project manager, i.e. you simply add the bunch of .pas (or .obj) files to your application directly.
The project will take care of compiling the Pascal files and linking them to your application.
Note that to install components into the IDE, you need a design time package (and that might link to a runtime package). But you don't need packages for your application.
These are some steps for your consideration:
Use -JP to generate obj files
Add these obj files in link step into your ilink32 command
If you use IDE and do not which ilink32 params then you may consider procexp or procmon to see these params.
I am developping a C++ DLL with C wrapper to be able to use it in different languages. For now, I can use it in C# and Python, and before to find how to do it on MATLAB, I have to find the way to read it on LabVIEW.
I am using Visual Studio, so I installed openCV on C:\, added the include directory and the .lib files to my project, created a new environment variable, and in my DLL I use it using #include <opencv2/core/core.hpp>. All this in 32 bits of course because LabVIEW is very bad on 64 bits.
But, when I create a node with "Call Library Function Node", after setting inputs/outputs, I click on OK and LabVIEW tell me it didn't find the dll associated to OpenCV.
I am a total newbie on this field (DLL) so I am not aware of what I have to check or add in LabVIEW.
Thank you in advance.
I'd suggest you to use Open CV static libs instead of DLL. You can download OpenCV source from opencv.org and download latest version of CMake from cmake.org. CMake will generate Visual Studio solution and other required files from platform-independent source files. So you will be able to change Visual Studio project target from DLL to static LIB and build static libs of Open CV on your own PC.
I finally managed this issue. I only had to copy/paste the DLL files of OpenCV on the same directory of the LabVIEW library.
I am trying to install a Delphi package from the VST SDk, my problem is that it says a .dcu is missing.
The .dcu is not missing, and before installing the package, it doesn't exist, but is created by the
IDE during the installation, so it's not precompiled from a former version of Delphi. The .pas file doesn't appear to be incomplete. All the other files appear to be installing just fine, this however is giving me a great load of trouble. I hope someone might help me :)
Im using Delphi 2010 btw.
Thanks in advance :D
Image showing my files and errors
Here's the SDK - im using 1.3
The problem is that the compiler cannot find the source files, or the dcu files.
There are several ways to solve this.
You can add the paths that contain the .pas files to your library, via /tools/options/EnvironmentOptions/DelphiOptions/Library/LibraryPath
You can add the paths to the search path of the project.
In the project options (ctrl+shift+f11)
You can add each file that you need to the project. shift+f11
Note that you can also point to the folder that contains the .dcu files, but that means you wouldn't be able to step through code when you're debugging.
I usually use method 1, because that settles it for all future projects that you use in this IDE. It's convenient if you create many projects that use the same library.
Some other people like to specify this per project, so that they have full control over the dependencies of the project.
I am wondering if we able to embed SQlite library into Delphi executable file and we may deploy our application as single .exe file without any SQlite dll file.
The embed is not keep the sqlite dll file into resource but link to Delphi executable file.
I have not tried this component out, but I plan to in the future
Delphi Inspiration - DISQLite3
There is also
Synopse OpenSource SQLite3 Framework
A Freeware version is available too
We have compiled SQLite3 with Borland's free command line tools C compiler and the resulting OBJ file we linked in Delphi with {$LINK 'OBJS\sqlite3.obj'}, and written the pascal wrappers for the functions we needed.
There was a problem resolving some standard C library functions when linking but we re-implemented them in Delphi.
I had the same problem and this is the solution I came up with. Maybe it can help you. Just include sqlite3 and you then have direct access to the dll functions. I used the same methods that have already be outlined:
http://simvector.com/download/delphi_sqlite3.zip
The DLL is just encoded in source form and the DLLLoader unit loads it at runtime. The end result is no extra DLL in your distro at the expense of it all being loaded into memory at once vs parts loaded on demand via the OS.
We needed it to work as normal, yet no extra dll in distro. So works for our needs.
Anydac SQLite driver has statically linked SQLite engine. It is commercial library, although. They has an article about anydac and sqlite.
Delphi can link .obj files, thereby if you have them available (or source code to compile them), you can link them into an executable. But you can't to that with the SQLLite dll.
IIRC DISQLite 3 does exactly that, check it.
You can download the SQLite open source and compile it into any environment that can compile vanilla C code. It's not especially hard.
I need to compress multiple files into a single archive using Delphi. I'd prefer to use freeware components or open-source components because I am very very cheap :-)
My primary requirements are:
Possible to encrypt the archive
Can create common archives that can be opened by anyone with a copy of WinZip
Does anyone have suggestions with components that they have used? Please feel free to suggest free as well as commercial components/libraries.
Perhaps DelphiZip is what you are looking for, it seems to support encryption, too, and is WinZip compatible. It is released under LGPL.
KaZip is an open-source ZIP archiver. Here is its description:
KAZIP is fast, simple ZIP archiver and
dearchiver which uses most popular ZIP
format.Inflate - Deflate zip
compression format (no encryption
support and no multidisk
support).KAZip is totaly based on
Delphi VCL - no DLL, ActiveX or other
external libraries.KAZip is totaly
stream oriented so you can deal with
data only in memory without creating
temporary files, etc. If you need to
add zip-unzip functionality to your
application,KAZIP is the right
solution. Additional ZipListView and
ZipTreeView components for easy
visualisation.Functionality:Zip-Unzip
using Inflate-DeflateBZip2 unzipping
trough usage of BZIP2 units from
Edison Mera Menndez.Functions:Adding
Files, Folders, Streams; Selecting,
Deselecting, Checking;Extracting to
files and streams;Delete and Rename
filesCreate, Delete and Rename
foldersTest, RepairMany new properties
and methods, improved speed.A very
complex Zip Browser demo application
is included
It is not compatible with Delphi 2009 yet, but with some minor changes in the source code, you can make it work in Delphi 2009 too. Actually, that's what I did.
Regards
I`m using madZip from madCollection
I'm surprised no-one has mentioned JclCompression yet - it's part of the well-known Jedi Code Library (JCL).
Here's a view of the unit itself : http://jcl.svn.sourceforge.net/viewvc/jcl/trunk/jcl/source/common/JclCompression.pas?view=markup
Note, it's compatible with 7-zip DLL version 4.64 - newer versions might not be backwards-compatible...
I recommend the $69 ZipForge from ComponentAce.
You could use 7zip (LZMA) bindings for Pascal (compatible with Delphi): http://www.birtles.org.uk/programming/
Another Delphi resource to look at would be InnoSetup. The source code is available and with a little work might give you an edge up on what your trying to do. There is an option to create self extracting zip archives which are compatible with WinZip,
My thoughts are not to use the program, but to use his source as a starting point since it is very heavily tested and extremely solid.
There are infozips zip32 and unzip32 dlls. They can be used from Delphi (even from Visual Basic), there are interface units/modules for both. The interface isn't as good as I would have liked it, but it works.