can't run a simple program in CLion - c++

I'm VERY new to CLion so please be gentle :)
I took a project I did for a programming course I'm taking, I managed to build it, but when I tried to run it the CLion just freezes. I tried to run it in debug mode, but no success there either - it waits for a few seconds and then I recieve a message: "command timed out".
I thought the problem might be in my program, so I wrote a simple "Hello World" program - still no success.
few technical specs that might help:
I use CLion 1.2.1 (Newest version).
For my toolchains I use TDM-GCC compiler (downloaded from here: http://tdm-gcc.tdragon.net/download) - I actually do not use the newest version - I use version 4.9.2-3 instead - because I wanted the GDB to be 7.8 so Clion supports it).
My computer runs windows 10 (64 bit), intel core i5-4210U, 8 GB RAM (for what it's worth...)
hope you could help me.

Avast antivirus running … changing its setting as you can find here Stop avast! from attacking my own programs can help...
– nnn

Related

First time using SFML-2.5.1 in NetBeans IDE 8.2 I ran into the problem

After the setup I've done in the properties of the project: at C++Compiler and Linker in both Release and Debug configurations I tried to build the project, which went successful.
Then I decided to run it and had some difficulties: using External Terminal, that did absolutely nothing, Standard output, that showed some text related to dll files I've clue about, Internal Terminal, that showed the very same text.
After that didn't work I went for cmd execution and what I saw was this.
Could you explain what that means and what I'm supposed to do. I'm new to all that kind of stuff, so I apologise if I did something stupid.
Cheers
EDIT: If not seen, I'm using Windows 10 and the version of SFML is GCC 7.3.0 MinGW (DW2) - 32-bit

MySql connector-c++ wont link in QtCreator but works fine locally on raspberry pi3

Firstly, thank you in advance for at least reading this question.
Secondly, feel free to call me an idiot if this is a "no brainer"
Now down to the issue at hand...
I am running Ubuntu 16.04 (64bit) with QT Creator as my IDE and on the whole it works great. I can cross compile for the Raspberry Pi3 (running raspbian) and also compile plugins for X-Plane.
Everything was going great until I needed to implement MySql into my project. That's when it all went south.
I can not use the Qt library for this as X-Plane does not like anything Qt related in its plugins. But that is fine, I have connector-c++ working on that machine and it connects to my MySql server and does everything it's supposed to.
I think I have read just about every forum and watched every youtube video on this but can not get Qt Creator to compile with connector for the raspberry pi.
I wrote/compiled a test app locally (with g++) on the pi and it works great. However for some reason (government plot maybe?) it refuses to link the libraries when compiling under Qt Creator.
The error I get when compiling in QtCreator is:
undefined reference to `get_driver_instance'
Currently,
I have followed the instructions for setting up a cross compiler here:
https://wiki.qt.io/RaspberryPi2EGLFS
Downloaded the connector code from here:
git clone https://github.com/mysql/mysql-connector-cpp
I have followed the instructions for compiling connector-c++ here:
https://dev.mysql.com/doc/connector-cpp/en/connector-cpp-installation-source-unix.html
And I have banged my head 1000x on a brick wall here:
(picture of blood stained wall not available)
Also, I have tried compiling connector on my Ubuntu pc with paths to the pi's sysroot etc. but i think it made a 64bit version which causes Qt Creator to have a dummy spit about "unrecognized format".
I am hoping that this is just me having a "senior moment" and that someone can point me in the right direction.
To save putting up irrelevant logs/code I will wait until someone asks for it and then copy/paste what they need.
Again, thanks in advance and know that I will be eternally grateful for any light on this matter (preferably before I go even insanerer)
Well after 2 weeks of pain, I have solved this problem. Here is what I think is the issue:
Firstly, I found that mysqlcppconn is not needed (at least for me) and used the mysql libraries in /usr/lib
Secondly, the symlinks to libmysqlclient.so.6.0.22 were by default:
libmysqlclient.so.6 -> libmysqlclient.so.6.0.22
The compiler was looking for libmysqlclient.so which didn't exist. So I created the link (libmysqlclient.so -> libmysqlclient.so.6) and it worked!!
Thanks to all who helped.

Eclipse error during remote debug session: sh: locale: not found

I'm really hoping to get an answer on this. I am using Eclipse to remote debug a C++ program on a (minimal) linux machine. I am aware that the linux machine does not have the locale binary installed. First off, the error received is the following in Eclipse after pressing the debug or run button:
org.eclipse.remote.core.exception.RemoteConnectionException: sh:
locale: not found
After the first run, successive runs do not display the error, only the first run. If I restart the linux machine, the error will come back for the first run again.
What is most obvious is that Eclipse, or the running program is calling locale on the linux machine and it is not available, not installed.
This machine is quite minimal and doesn't even have a package manager - it's an embedded system. So I tried to install "locales", "locale" as well as "locale-all" using multistrap when building the linux image. None worked.
When using debian repositories, multistrap returns
E: Unable to locate packages locales
So I guess my real questions are:
1) What debian package supplies "locale" found in /usr/bin/locale? How
can I install it without adding a lot of of overhead on an ARM system? (assuming no package manager)
2) Where is the source code for locale?
And third,
3) In Eclipse, can I prevent the running program or Eclipse from
calling locale? This is preferred.
After scouring the forums, I found one guy that said he got the same issue and "manually fixed it", however he did not provide the fix.. Hope to get some help!
That reference can be found https://www.eclipse.org/forums/index.php/t/1081283/
Thanks,
I had the same, so I changed the encoding to ISO-8859-1 in the debug settings.

"Program File does not exist" while trying to debug with Eclipse/OpenOCD

I recently got a nrf51 bluetooth module and I am trying to debug it with Eclipse Mars. I installed the required toolchain as well as OpenOCD (I am using STLink v2 to debug the board).
While running openOCD and arm-none-eabi-gdb in console, everything works fine. The OpenOCD server starts up and I am able to connect with the gdb tool.
However, when trying to start a debug session with Eclipse, it throws the error "Exception occurred during launch. Reason: Program file does not exist". The build process finishes normally. It's the first time I used Eclipse for C/C++ development and the first time after years I used Eclipse at all so I don't even have an idea what could be wrong.
I tried messing around with the project settings without luck. Can anyone give me a hint?
I should mention, I used an already existing Makefile since I tried compiling one of the nordic SDK examples. I Changed it so the resulting files are ready for debugging.
In past I've used Segger's Jlink programmer and the JlinkExe (A pre-built binary) for Linux platform to program Nordic Bluetooth module such as NRF51 and it worked seamlessly. There are some very good documentation on using GNU toolchain with NRF51 series SOC and in case you get your hands on Segger's Jlink, I would recommend you to use that for programming. Meanwhile, this thread in the Nordic's developer zone seem to be very much similar to your problem. Maybe you'll be find some clues there.

Netbeans always compiling from the beginning

I'm having a quite big C++ project in Netbeans. It takes about 3 minutes for it to compile (with -j5 mode enabled).
I'm using my VM server (FreeBSD) hosted on Windows 8 and using SFTP option to compile.
Everything is working like a charm except that it looks like Netbeans is always making clean while compiling (no clean messages appearing in the output console though!). It's really annoying for me to wait 3 minutes for each change I have to make in my source code.
My friend had a similar issue some time ago - it was related to the Netbeans timestamps files (different time setting on the local & remote VM machine). In my case the VM machine time setting is the same as on my PC.
I am currently running Netbeans version 7.3.1 (because later & latest version are having some odd SFTP issue not working correctly). I've also tried the latest beta build including earlier versions and it doesn't seem to solve my problem.
Whats the problem? I will appreciate every solution.
There is excellent article "Make Dependency Checking" on this topic by NetBeans team which is worth reading to understand this behaviour.
NetBeans internally uses make utility for dependency checking defined in Makefile. When we create a new project in NetBeans, it enables "Full rebuild" feature. This leads to this particular behaviour.
However if want to avoid this, we can change this particular feature to "Incremental rebuild".
For complete information and to understand its consequences, please refer the above article from NetBeans team.