ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.01k stars 407 forks source link

Console window pops up when using Simd library on Windows in GUI application #268

Closed janrysavy closed 4 months ago

janrysavy commented 4 months ago

When invoking the std::string Execute(const char* cmd) function (during Simd initialization), which internally calls _popen, a console window briefly appears. This behavior is disruptive, especially in GUI application.

ermig1979 commented 4 months ago

Hi! Thank you for bug report. I added this issue to roadmap.

janrysavy commented 4 months ago

Would you be interested in pull request? Use CreateProcess instead of _popen on Windows? Unfortunately it would by more verbose solution.

Lazy loading in this case would be probably also a good idea.

ermig1979 commented 4 months ago

Hi! Certainly it will be greate if you make a pull request with solution of this issue. I think it will be something based on this:

https://stackoverflow.com/questions/42402673/createprocess-and-capture-stdout

Of course, if it doesn't cause any bothes for you.