Win
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
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
How to force Win10 to use certain interface for “browsing”
Problem was that before only two ethernet-interfaces were active. One for the company-intranet (which was gateway for internet) and the second one for some device connection.
After adding some 10 GigE-interface, somehow all DNS-requests were first routed via that interface. Which lead to a delay of 3-4 seconds for loading pages.
Can be fixed via setting a lower metrik to the interface, which influences the routing-table: “network- and sharing option > the specific adapter > “IPv4” > “Settings” > “Advanced settings” > bottom “metric” from “automatic metric” to some lower value. Usually it should be 25, I set 13.
You can check via CMD: $ route print for the current value. The used Gateway should have the lowest metric.
EFI partition on usb-stick: Win10 not able to remove it with the diskmanager
Regular formatting/diskmanager can not handle it.
Additional tools were not available/allowed to install.
So the trick was to use “diskpart” (CMD ..):
- then “list disk”
- “select disk1” (or the one medium which contains the partition(s))
- “clean”
- confirm the error
Then use a regular tool to create a new partition.
Win: run script after executing the VisualStudio-environment-command
Problem: our CMakeLists.txt contained one specific variable which is just set via the VisualStudio-command-prompt. But I did not want to start that cmd, then execute our “start IDE”-script from there. Naa, too much clicks 😉
Copy this as bat-file to the directory where the qtcreator.bat would be.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
@echo off rem inspiration from https://www.codeproject.com/Questions/541856/Batchplusfile-3aplusOpenpluscmd-2cplusrunplusVSplu set workingDir=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools\ set vs=VsDevCmd.bat rem execute the VS build enviroment cd %workingDir% call %vs% rem go back to current directory cd /d %~dp0 qtcreator.bat |
python: maximum size of certain containers
Getting the 64 bit version is quite important. Still don’t get it why for Win the 32 bit one was preferred ..
1 2 |
import sys print(sys.maxsize) |
32 bit: 2147483647 (elements)
64 bit: 9223372036854775807 (elements)
20190711 edit: even if the container could keep that much elements – remember that [Boolean] is 24 Byte (intead of one Bit) in vanilla Python. Means: if you run out of real memory, then MemoryError :/
cmd replacement: cmder
Sometimes you have to call some batch-files with spoecific windows-tools, so a bash is not helpful on Win.
A colleague recommended cmdr, which is quite nice and fine.
Suits my needs 🙂
Retrospective view at 2018
The first month of 2019 already passed. And we passed it with flying colors!
But let’s have a look at 2018 – a year full of challenges and success: I’ve worked full-time, organized and participated in advanced courses for Python and in Requirements Engineering (officially: IREB Requirements Engineering Foundation Level-approved) and pursued a new employment as software engineer.
And I wrote some software in my spare-time, as you can see in the graph for the public github-repositories. The gaps in the commits can be explained with the birth of my daughter and the time where I acquired the new job and moved nearly 900 km across the country. Yay! Nice personal projects were and are Cullendula and the Daily Coding Challenges, which I solve mostly with fully Unit-tested Python (3).
More new, hands-on knowledge was gained in the area of CMake and Qt-charts.
Well – 2018 was great. Let me make 2019 greater! 💪
Fix whitespace
Sometimes there is too much whitespace and tabs in my last commit.
In former times I used a VisualStudio-plugin, but this is not helpful there. So I wrote a small script (see on my github) which:
• replaces all tabs with four spaces
• removes all trailing whitespace
• converts line-endings to CRLF
I invoke it on the list of all changes files in my last commit in the git-repo with:
1 |
$ git diff --name-only HEAD~1 HEAD | xargs -L1 ../removeTrailing.sh |
(first part gives you a list of changed files and then feeds it to the script for execution)
Enable Profiling on Windows even with Meltdown-patches
1 2 |
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 3 /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f |
Helped with Visual Studio 2015. Should also work for 2013 and 2017.