PocketSphinx for Windows desktop in Java - desktop

I downloaded the library files (.dll) to make PocketSphinx work for Windows desktop. From the command prompt it is working. I want to use these dlls in a Java application so that I can create a .jar and use it as a whole.

You can not use pocketsphinx.dll in java. You have to compile JNI extension in a special way as explained in:
Getting Started with JNI and C under Windows
pocketsphinx already supports SWIG, so you can create the wrapper automatically from pocketsphinx.i interface description. However, you need to compile everything into dll file after that yourself. You can collect sources and just write another makefile.

Related

C++ qt application compilation in one file

I have written windows gui application using qt and i want to deploy it.Now when i place .exe to other PC it shows error which says that qt5core.dll and etc required.I can install this dll,but is it possible to run exe app with qt without qt's dll as one file?So i can for example give .exe to my friend and he can instantly run it without installing .dll?
Basically, if you want a single exe file, you probably mean static linking.
The legal commercial version makes it possible or if I am not wrong, you will have to build a static qt version.
In the latter case, you will have to provide the source code of your application.
I do this sometimes, but you'll have to be careful with the license requirements: if you go with GPL, it should be OK, if you choose LGPL, it may be a bit less simple. No idea about the commercial version.
What you must do is building Qt statically, and then use that Qt build to build your application. I had a good experience with mxe. MXE builds an entire crossbuild environment and allows you to build your big Qt exe statically. I used it on Mac OS and Linux to build static executables for Windows, but you can probably run it on WSL. It takes a bit to compile, but it is simple to use. Please note that it cannot be used if your app needs QtWebEngine as it won't build with mingw.
Another simpler option is to create an installer. The Qt installer framework is simple to use. If you include the VS runtime, you end up with a single exe to distribute (the installer).
You always need to include the libraries you use (including your compilers runtime libraries in fact) when you deploy your executable - otherwise how would your application be able to use the code in those libraries? You may be able to statically link some/most things, but rarely everything. Look into how to create an installer / package for your application, so you can bundle up everything as one convenient file.
You can buid you app using QT Static (a large .exe file, no external dependencies)
If you are using LGPL Qt, you must read this:
https://www.qt.io/faq/3.7.-what-are-my-obligations-when-using-qt-under-the-lgpl
Yo can use Qt and static linking, but "The user of your application has to be able to re-link your application against a different or modified version of the Qt library"
You can use an application template like this, very useful for LGPL Qt:
https://marketplace.qt.io/products/qt-lgpl-app-template

Creating a Dylib file using Swift or Objective-C

Is it possible to create a .dylib file from a Objective-C or Swift coded-project, or must the code be written in C++?
I've seen several sources, but they're all written in C++.
see - Creating and Using a Simple .dylib
and
How do I create a dynamic library (dylib) with Xcode?
Is it even possible to create a .dylib file using any other language than c++?
As we discussed I have created an sample app for OS X. It uses dylib with single Foo Swift class. Foo has doSomething method, which logs kind of "hello world" message into the console.
Once you are built the project, you can find the dynamic library inside the application bundle in the Frameworks folder. It named libFoo.dylib.
Source code:
https://github.com/melifaro-/OSXDylibSample
Hope it helps.

Qt Creator - SFML Link to a console project

I am currently working on a project in console mode in which I wish to implement a sound. Our choice then turned to SFML, we get to install and use on OS X. However, we need to make it compatible with Qt project for rendering, I generate a.Profile and integrate our code and the library.
In OS X, no problem, installation and use possible. However, for this project, we need to integrate it into the code to make only archive. But every attempt to link our project with the aforementioned library, we run into errors.
Could you tell us exactly what files are to be included in the project? Working on protecting machines, we cannot install packages. Here is the screen of the integration window, the button exhilarating. We cannot select the Library.
You just have to use the external library instead of the internal.

How to create standalone application for cross-compiled Qt for wince?

I followed this link to cross compile Qt for wince.
http://qt-project.org/doc/qt-4.8/install-wince.html
Everything worked as link says. I am able to run the applications on Visual Studio emulator for wince.
Now how do I make a single executable that can run on wince based device?
You have 2 ways to go:
1- Compile everything in your program statically (static linking).
2- Use UPX to compress everything in one file, which will decompress and open automatically.
http://upx.sourceforge.net/
Just be aware of the licensing problems in Qt if you use static linking with Qt.

C++ windows dll and libxml2 dependency woes

I develop a plug in dll, i.e. some other process loads my dll, C++ using VS...
I need to add xml parsing to my code and I use libxml2.
I have added that do my dll and now when the application tries to load my dll it fails to load. It is a dependency issue but I can not figure out what all other libs/dlls I need to add to my project.
Any ideas?