clion LLDB & Qt formatter scripts - clion

Clion just got lldb support on win msvc (yay!) and I do wonder... how can I install formatter script to it?
I found out this info/repo
https://unlimitedcodeworks.xyz/blog/2016/08/20/gsoc-kdevelop-lldb-final-report/#using-data-formatter-scripts-outside-kdevelop
and
https://cgit.kde.org/kdevelop.git/tree/plugins/lldb/formatters?id=a4e6c0aa1597e1c9558139da7a5e76fdadd075a8
But not sure what/where to put it... ?

Create a ~/.lldbinit file.
Use command script import <python formatter file path> in your ~/.lldbinit.

Related

How to compile pascal file without IDE

I need to compile .pas without IDE on Windows.
How can I do this via cmd?
You can't compile code without a compiler. A compiler is software that compiles code. There is no compiler built into CMD.EXE
Unfortunatly I can't found the compiler therefore I download TurboPascal. I write my code in Sublime Text then I open CMD and use fpc *filename.pas* command.

How to change 'make" command settings to compile C++ code on mac os

I started programming in C++ on my mac.
So far, I just write my code in a text editor (Sublime), and run it from terminal using the 'make file.cpp' command and then run it with './file.cpp'.
It worked until now, but with more elaborate code I get an error that my C++ version has to be at least C++11.
So I was wondering how to change the parameters of the 'make' command to be able to change the C++ version compiled in C++14 for example.
I understand that using 'makefile' is easier, but is it still possible to change the 'make' parameters?
Thank you very much

How can I get all the compile commands from Xcode?

I am working on OCLint, and OCLint need all the compile command to do the lint job. now OCLint using xcpretty to parse xcodebuild.log to get the compile commands. So, I have to build the project even I only want to lint few source files. I wonder is there anyway to get the compile commands other than parse the xcodebuild.log?
One way of doing it is to write a wrapper for clang and linkers.
Using this answer: How can I force Xcode to use a custom compiler? you can redirect Xcode to compile your code with your own "clang" which might be a python shell script. This script would just grab a command passed to it and dump it to some file.
One detail though: if you use custom CC Xcode will also try to use it for linking C/C++ files this is why your script has to do nothing if it is called in a linker mode.
I have used this technique for another task: compiling my whole project with -emit-llvm flag to get all my code as LLVM bitcode. The example of a similar Python script can be found here.
Start by writing "hello world" script. Tell Xcode use it as CC, run your project and see the "hello world" string in your build log. From there you will know how to proceed.
I just use the -dry-run and regexpr to filter the compile commands. The -dry-run said,
-dry-run do everything except actually running the commands
The performance is just ok.
And it will be great if xcode provide one. They will be the only who can do this, and I think it is pretty usefull.

How to watch c++ STL collections in NetBeans 8.1 debugger with cygwin toolchain?

I'd like to see elements of vector in NetBeans with cygwin toolchain. There are some instructions, but it is not clear how to apply them to cygwin. Did anyone have positive experience with it?
Thanx.
On Windows 10, with Netbeans 8.2 and cygwin64:
check if libstdc++ is installed (using cygwin 'setup-x86_64.exe')
download the scripts at
https://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx
copy all folders and files including folder 'libstdcxx' to cygwin. For example:
c:\bin\cygwin64\usr\share\gdb\python
(after copying, there should be a file 'printers.py' at the folder:
c:\bin\cygwin64\usr\share\gdb\python\libstdcxx\v6
open Netbeans project properties/debug and check where it's looking for the Gdb ini file (mine is at c:\users\MYUSER\.gdbinit)
create a file .gdbinit at that folder, containing:
python
import sys
sys.path.insert(0, 'c:\bin\cygwin64\usr\share\gdb\python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
(attention to the correct sys.path.insert above)
rebuild your project. When debugging, the 'Variables' tab will show meaningful info.

How to run MonoDevelop's nunit-console on OSX?

The MonoDevelop I'm using came with Unity3D. I can see nunit-console inside its package contents at MonoDevelop/Contents/Frameworks/Mono.framework/Versions/2.10.2/bin/nunit-console, but what I can't figure out is how to call it from inside Terminal.
Here the guy mentions adding a path to MONO_PATH, but I don't know how to address a path inside a package and when I type env, I do not see a MONO_PATH at all. Also mono is not recognised as a command in Terminal, so the advice here doesn't really help me either.
It's got to be a simple configuration issue, but I'm new to developing in OSX.
Try this:
Write the following command on Terminal
mono {path to nunit-console.exe}
For example: "mono Downloads/NUnit-2.6.4/bin/nunit-console.exe"
nunit-console is just a shell script that calls nunit-console.exe .NET Assembly using the full path to mono, so try to open the file in a text editor and see if you can see where it thinks that mono should be.
What error do you get if you try to execute:
MonoDevelop/Contents/Frameworks/Mono.framework/Versions/2.10.2/bin/nunit-console
from Terminal?

Resources