You have to compile your Add-On for every Archicad version separately, but you can use the same code base for all versions. Sometimes the API changes so you have to write some code to make it work with all versions.
ACAPI_Goodies_GetElemTypeName (elemHead.type, elemTypeName);
ACAPI_Goodies (APIAny_GetElemTypeNameID, (void*) elemHead.typeID, &elemTypeName);
You can find even more examples here.