It shouldn't be using OSS OSS is selected during sphinxbase configuration. You need to install alsa development headers, reconfigure sphinxbase and make sure alsa is selected, then reinstall sphinxbase, then reinstall pocketsphinx. I also recommend you to try more powerful boards for voice experiments.
Try Vosk https://github.com/alphacep/vosk-api/blob/master/java/demo/src/main/java/org/vosk/demo/DecoderDemo.java
Ok, you can try to remove -static-libgcc from the flags, it might help. Otherwise you'd better recompile pocketsphinx/sphinxbase with mingw too. Or you use MSVC to compile your binary since libraries were built with msvc. In general the rule is that you use single compiler for all the libs and binaries in the project. On Windows they are not easily cross-compatible due to different runtimes.
I asked mingw OR with a visual studio
Did you compile pocketsphinx_batch.exe and pocketsphinx.dll with mingw or with a visual studio?
Then you need to check compilation params. It is something about dll, not about your code. It crashes when it plugs first sphixnbase functions.
Looks good now, thank you! Attention to details will help you in your programming career. As for exit after start, it exits because it fails to find the dlls (sphinxbase and pocketsphinx). They must be in the same folder where you run the program. You can use dll explorer to make sure dlls are present.
Please click edit button in your original post and format the code properly.