How to use external terminal like xterm instead of the internal one in Clion Debugging? - ncurses

Just like the title.I'm writing an game which is using ncurses.External terminal doesn't work correctly.
I tried to look for the setting in Clion but nothing was found.

Here you can find how to execute a clion C program in an external terminal
the only difference is that you have to replace the executable path of gnome-terminal with your path to xterm.
Another option is remote debugging as it's supported by clion since 2016.1 version.
check out the official jetbrain blog or the official youtube tutorial.

Related

Cannot change node version in VS Code terminal

I'm working on Mac and I cannot change node version from terminal window in VS Code
What's interesting, when I open iTerm I have no problems with switching versions. So the problem only seems to appear on VS Code.
Any idea why and how to solve it?
vscode has a shell integration, which you can configure. e.g. placing the following configuration in your vscode settings
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
or you can use the shell launcher plugin, which supports launch multiple shell configurations in the terminal.

How do I debug a *-pc-windows-msvc Rust program on windows using LLDB?

I'm having problems debugging Rust programs with LLDB on windows.
LLDB doesn't seem to be able to find the PDB file, even though it's in the same directory as my binary.
I run LLDB from the command line on my binary and no luck.
I also tried using the --symfile option of the debuggers file command and it still won't display any debugging info.
Any ideas?

Launch Labview program through Python

I am working on a project in which I have to launch a VI (Labview program) through my GUI written in python. I have not the administrator rights so I installed PyCharm Community with the JetBrain Toolbox and Python 3.3 with an MSI file.
I read on the internet that to do what I want, I need to install the pywin32 extension: extension -link, but when I launch it, it doesn't find my Python installation.
So, my question is: is there another way to control VI from python?
Thank you in advance for your answer. I am a beginner in both languages.
If you want to run a plain VI, you have to run the LabVIEW IDE -- a
VI is a source code file, not a built executable, so to run directly,
it has to be hosted in the editor.
If you want to run a VI built into
an executable, you obviously have to run that built EXE.
So, either way, you're going to have to be able to launch an EXE.
Can your Python invoke C-style DLLs? If so, you could build your VI into a DLL and then call the VI that way.

How can I change how eclipse invokes gdb in linux?

In short, I need to understand how to configure eclipse to run "optirun gbd" instead of "gdb". An explanation of what exactly I'm trying to accomplish follows.
I need to run my debug app in eclipse such that it will use the nvidia optimus card instead of the integrated card. My app requires opengl support that is only available this way.
I've got a laptop with an nvidia optimus video card. I'm running linux (ubuntu). I've successfully set up bumblebee such that I can take advantage of the optimus technology. This requires that, to use the nvidia card, I run a given program "foo" with the program "optirun:" optirun foo.
I need to configure eclipse to launch my program in debug mode under optirun. If I run from command line: optirun gdb app everything works as expected.
Edit: Changing the "GDB Debugger" field inside the debug configuration to optirun gdb does not work. Lanching eclipse by optirun eclipse does, however. But this is a detriment to battery life.
Go to "Debug Configurations", open "Debugger" tab. Change "GDB debugger" from gdb to optirun gdb.
Works in Eclipse Juno, Ubuntu 12.04.
Since I'm sure eclipse uses the shell to execute the program, a workaround is to alias gdb to optirun gdb in ~/.bashrc
I look into this issue today and I found another solution. As long as you have Bumblebee installed (http://www.bumblebee-project.org/) and you know you can attach optirun to an executable (try with glxgears for example) you can attach it to cuda-gdb.
What I did is create a script:
#!/bin/bash
optirun /usr/local/cuda/bin/cuda-gdb $*
And save it to /usr/local/cuda/bin or somewhere else it doesn't matter, with the appropriate permissions for execution (755).
What it does is very simple, it runs optirun cuda-gdb args where args is whatever the command line sends it.
In terminal just run opti_cuda-gdb with or without arguments.
For example I named it opti_cuda-gdb and placed it in that directory (which conveniently is added to the path if CUDA is properly configured).
If you use an IDE to develop, like say Netbeans, point the debbuger executable to that script.
I've been successfully compiled and debbuged code using CuSparse and CuBlas with NetBeans running in a SAMSUNG SF410 with Nvidia Optimus and Ubuntu 11.04 and 11.10.
I'm open to provide further details if you think I omitted something.

How to make a symbolic link with Cygwin in Windows 7

Recently I have tested to write an Android application with native code in C/C++. The problem is in making symbolic links when using the Android NDK. After some googling, some say to use Cygwin. I have installed it now. How can I make a symbolic link with Cygwin in Windows 7?
In short, define the following environment variable:
CYGWIN=winsymlinks:nativestrict
According to Cygwin documentation:
If set to winsymlinks:native or winsymlinks:nativestrict, Cygwin creates symlinks as native Windows symlinks on filesystems and OS versions supporting them.
The difference between winsymlinks:native and winsymlinks:nativestrict is this: If the filesystem supports native symlinks and Cygwin fails to create a native symlink for some reason, it will fall back to creating Cygwin default symlinks with winsymlinks:native, while with winsymlinks:nativestrict the symlink(2) system call will immediately fail.
You should also make sure you run Cygwin with elevated privileges (right-click the shortcut and choose Run as Administrator, or set the mintty shortcut property, Advanced → Run as Administrator).
Some details are provided in the other answer.
I got it the next day! So, not to wrongly get ignorance thinking like me (newbie to Cygwin), I answer it now.
Making a symbolic link for Windows 7 is easy with the usual command:
ln -s
The answer is setting up Cygwin with the required packages such as make, etc.
Read the requirements clearly: Android NDK
You may try to use "mklink" instead of "ln -s" as Tony O'Hagan suggested in an answer to Git Bash shell fails to create symbolic links.
We had a similar problem and had a solution not documented in previous answers.
We needed a way to create a directory remote link that worked for both Cygwin and Windows 7 to a remote Samba (Linux) share.
We used this command in Windows PowerShell and it worked.
CMD /C MKLINK /D C:\local_dir_path\dir \\\\192.168.0.1\remote_dir_path\dir
The above command makes a link that works in both.
Of course, please change the local and remote directories to meet your needs.
ln -s works in Cygwin, but not Windows.
Using a "make link" command in Windows Explorer (folder view) worked in Windows, but not in Cygwin.
A similar command as above entered in Cygwin did not work and we didn't completely understand why. Perhaps it is related to conversion of strings or paths.

Resources