What is a dynamic language, and why doesn’t C# qualify?

What is a dynamic language? Whether or not a language is dynamic typically refers to the type of binding the compiler does: static or late binding. Static binding simply means that the method (or method hierarchy for virtual methods) is bound at compile time. There may be a virtual dispatch involved at runtime but the … Read more

Linking a shared library against a static library: must the static library be compiled differently than if an application were linking it?

You do not have to use PIC code in shared objects (as you have discovered you can use the -mimpure-text option to allow that). That said, non-PIC code in shared objects are more heavyweight. With PIC code, the text pages in memory are just direct memory mappings of the text pages on disk. This means … Read more

CMake and Static Linking

I’ve managed to solve my problem by using the following: #Dynamic/Shared Libs … #Static start set_target_properties(icarus PROPERTIES LINK_SEARCH_START_STATIC 1) set_target_properties(icarus PROPERTIES LINK_SEARCH_END_STATIC 1) set(CMAKE_FIND_LIBRARY_SUFFIXES “.a”) #Static Libs … #Set Linker flags set(CMAKE_EXE_LINKER_FLAGS “-static-libgcc -static-libstdc++”) This works without passing a -static which creates other big issues, and can essentially mix static and dynamic libraries. As long … Read more