Visual Studio 2015: error LINK1158 rc.exe not found
Challenge: Visual Studio 2015, Windows Kit 8 and 10 installed, test application (as solution) for a SDK not buildable
Solution:
copy rc.exe and rcdll.dll from
C:\Program Files (x86)\Windows Kits\8.1\bin\x64
to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
SSH/SCP quick help
Challenge was to reconfigure a device, which has a Linux running on a TQ-board. Some files had to be adjusted.
Connect to the device:
1 |
ssh <usernam>:<ip> |
(Then enter password.)
List amount of free space:
1 |
df -K . |
Show target of symlink:
1 |
readlink <file> |
quick git stats
(Another way without external tools.)
1 2 3 |
export LC_ALL='C' git ls-tree -r HEAD | sed -re 's/^.{53}//' | while read filename; do file "$filename"; done | grep -E ': .*text' | sed -r -e 's/: .*//' | while read filename; do git blame -w "$filename"; done | sed -r -e 's/.*\((.*)[0-9]{4}-[0-9]{2}-[0-9]{2} .*/\1/' -e 's/ +$//' | sort | uniq -c |
Visual Studio testrunner still running … and stopping you from accessing DLLs for linking
Problem Challenge:
Several instances of vstest.executionengine.clr20.exe are still running, despite closing that nice Visual Studio 2015 and therefore the access to compile and link several DLLs with QtCreator is blocked.
Closing them one by one with the taskmanager is annoying.
Solution:
* CMD as admin
* $ taskkill /IM vstest.executionengine.clr20.exe /T /F
* or: $ wmic process where name=’vstest.executionengine.clr20.exe’ delete
QTest: increase the timeout duration for a test-case
Set via environment variable QTEST_FUNCTION_TIMEOUT a higher timeout duration.
qputenv sets them temporary for the run of the single test case (put this at the beginning of the test case).
1 2 3 4 5 6 7 |
std::string duration("1200000"); // 1200 seconds -> 20 min QByteArray timeoutDuration(duration.c_str(), static_cast<int>(duration.length())); qputenv("QTEST_FUNCTION_TIMEOUT", timeoutDuration); { // just for checking .. auto result = qgetenv("QTEST_FUNCTION_TIMEOUT"); qDebug() << "timeout set to:" << result << "ms"; } |
nota bene: This block has to be put before qExec is ran, so put it into the constructor of the test-suite!
Qt: libpng warning (exception) about wrong color profile (sRGB)
Problem: libpng warning: iCCP: known incorrect sRGB profile
When debugging Qt applications which load some PNG as icons at startup, it could be annoying to continue with the debugger for each thrown exception.
So, let us fix them.
Invoking $ mogrify *.png in the icon directory will fix them.
How to get mogrify? Install imagemagick.
Either manually or on macOS via homebrew: $ brew install imagemagick
libPNG in version 1.6 has to be at least installed: $ convert -list format | grep PNG