Do I need to define Solidity version on Remix IDE? - solidity

How do I define Solidity version on Remix IDE?
Not sure if I need to define the version.

You can set the compiler version in the Solidity Compiler tab (3rd icon on the left).
And, of course, you also need to include the version in your solidity source files, like this: pragma solidity 0.x.x. More on that here

Related

CMake: Howto test for compiler, before enable a language

In my project some code can be optional compiled in a different language (nasm & fortran), but it's also fine to compile the project without having these compiler installed. E.g. on Windows.
I would like to check if the the compiler are installed, before enabling the languages with enable_language
enable_language(ASM_NASM)
enable_language(Fortran)
If I use enable_language without an additional check, CMake stops with an error message.
(At the moment I check for if (MSVC) as workaround.)
Btw. I have a similar problem with the check for Qt. The check don't stop with an error, but generate a lot of noisy warnings.
So use check_language to check if a language can be enabled.

How to open kotlin repl using kotlin-native-linux?

I just downloaded kotlin compiler kotlin-native-linux-1.3.61.tar.gz
from here: https://github.com/JetBrains/kotlin/releases/tag/v1.3.61
But when I try to open the repl, as proposed in the documentation, running:
/opt/kotlin-native-linux-1.3.61/bin/kotlinc
I get:
error: you have not specified any compilation arguments. No output has been produced.
The documentation says: "We can run the compiler without parameters to have an interactive shell"
How can I open the kotlin repl?
repl is available in kotlin-compiler-1.3.61.zip.
kotlin-native is for compiling Kotlin code to native binaries, which can run without a virtual machine.
Probably there is no reason to add repl and -script support on kotlinc of kotlin-native package.

How to create debug and release versions of libraries

I'm releasing a library which will be able to install headers and .a libraries for reuse. I would like users to be able to link either to release or debug builds of the lib if they so desire. I know that I can use DEBUG_POSTFIX like in Create a directory based on Release/Debug build type in CMake. My question is how do the users differentiate between the two? They would still put target_link_libraries(mylib), so I don't understand how a debug build would be chosen.
If MyLibTargets.cmake is correctly made they don't specify between the two. MyLibTargets.cmake should properly set IMPORTED_CONFIGURATIONS and IMPORTED_LOCATION_<CONFIG> for the target mylib. Then Debug maps to the Debug location and Release maps to the Release location. This is done automatically using the export command for multi-configuration generator. It's not really any different how a multi-configuration generator chooses Debug / Release libraries for any regular library target.

Are the g++4.3 and g++4.7 series ABI compatible?

Also if I compile a piece of code with c++11 flag will it be compatible with another code compiled without c++11 flag? Where can I find the compatibility list?

Building C Runtime along with program ANTLR

I want to write a program using antlr (target C language) and I want to ship the library (C runtime distribution) to the package so that it can use on other machine without installing antlr on that machine. I've downloaded the latest version of this runtime on this link http://www.antlr.org/download/C . Could anyone please tell me if I can do that? Cheers.
Yes, you can link it statically but how to do this depends on your platform. For Linux with gcc or llvm you can do:
g++ main.c -Wl,-Bstatic -lantlr3c -Wl,-Bdynamic -l<other dynamic libraries>
Anything after -Bstatic will be included in the executable.
Depending on your jurisdiction, the C target license requires that you include the license text with your program in some way.
I've not used the C target but have used the C# target. I assume they work in a similar way.
You will need to deploy the C runtime library with your program as the generated parser and lexer will use functions in this library.
You don't need to install Antlr itself eg AntlrWorks or any .jar files