sox FAIL util: Unable to load MAD decoder library (libmad) function “mad_stream_buffer”

Steps to using SOX to create MP3s: Download latest version of SOX and install. Download libmad-0.dll and libmp3lame-0.dll. The currently only known trustworthy source is ossbuild but this requires you to download a 1.5 GB archive. The selected two files are available here and here. Add libmad-0.dll and libmp3lame-0.dll to the folder where SOX was … Read more

How do I read from a version resource in Visual C++

This is an edited version of my original answer. bool GetProductAndVersion(CStringA & strProductName, CStringA & strProductVersion) { // get the filename of the executable containing the version resource TCHAR szFilename[MAX_PATH + 1] = {0}; if (GetModuleFileName(NULL, szFilename, MAX_PATH) == 0) { TRACE(“GetModuleFileName failed with error %d\n”, GetLastError()); return false; } // allocate a block of … Read more

Possible problems with NOMINMAX on Visual C++

Using NOMINMAX is the only not-completely-evil way to include <windows.h>. You should also define UNICODE and STRICT. Although the latter is defined by default by modern implementations. You can however run into problems with Microsoft’s headers, e.g. for GdiPlus. I’m not aware of problems with headers from any other companies or persons. If the header … Read more

Visual C++ executable and missing MSVCR100d.dll

You definitely should not need the debug version of the CRT if you’re compiling in “release” mode. You can tell they’re the debug versions of the DLLs because they end with a d. More to the point, the debug version is not redistributable, so it’s not as simple as “packaging” it with your executable, or … Read more

Why is “array” marked as a reserved word in Visual-C++?

It’s not a reserved word under ISO standards. Microsoft’s C++/CLI defines array in the cli namespace, and Visual Studio’s syntax highlighting will treat it as a reserved word. This usage would be considered a vendor extension and not a part of any international C or C++ standard. ISO C99 Keywords: auto enum restrict unsigned break … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)