GCC ABI compatibility

Since gcc-3.4.0, the ABI is forward compatible. I.E. a library made using an older release can be linked with a newer one and it should work (the reverse doesn’t). Obviously, there could be bugs, but there is only one mentionned in the documentation: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33678

What does ‘__COMPAT_LAYER’ actually do?

__COMPAT_LAYER, and How To Use It __COMPAT_LAYER is a system environment variable that allows you to set compatibility layers, which are the settings you can adjust when you right-click on an executable, select Properties, and go to the Compatibility tab. There are several options to choose from in addition to the one you know about: … Read more

How to set “Run this program as an administrator” programmatically

You can programmatically set the “Run this program as an administrator” flag (the option you find in the Compatibility tab of an EXE’s properties), by setting a simple registry key. You need to create a string value (REG_SZ) under one of these keys (if you want the setting to be per user or per machine, … Read more

Creating a portable library to run on both linux and windows

This is a typical way to export a DLL API for Windows and still support Linux: #ifdef __cplusplus extern “C” { #endif #ifdef _WIN32 # ifdef MODULE_API_EXPORTS # define MODULE_API __declspec(dllexport) # else # define MODULE_API __declspec(dllimport) # endif #else # define MODULE_API #endif MODULE_API int module_init(); #ifdef __cplusplus } #endif In the DLL source: … Read more

How to write Python 2.x as much compatible with Python 3.x as possible?

I’m putting the finishing touches on an approximately 5000 line, deduplicating backup program (http://stromberg.dnsalias.org/~strombrg/backshift/) that runs on CPython 2.[567], CPython 3.[0123] (3.3 is still alpha 0), Pypy 1.7 and Jython trunk. I also tried IronPython, but it was a pretty different thing – it had no standard library, so no backshift love. Oh, and it … Read more

javax.xml.parsers.FactoryConfigurationError running JBoss AS 7.1 with Java 7 update 171

Could you try upgrading jboss-modules.jar (found in the root folder of the jboss-as binary distribution) to 1.1.5.GA? The version of jboss-modules which comes with jboss-7.1.1.Final is 1.1.1.GA and it has a few issues with initialisation order and multiple-initialisation which could be causing the issue.

Do Intel and AMD processor have the same assembler?

AMD and Intel processors(*) have a large set of instructions in common, so it is possible for a compiler or assembler to write binary code which runs “the same” on both. However, different processor families even from one manufacturer have their own sets of instructions, usually referred to as “extensions” or whatever. Ignoring the x87 … Read more

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