Sunday, October 15, 2017

C++ Code Log - activities that I've been learning or doing the past month #1

Things learned:
Zenwinx/Udefrag needs only ntdll.lib no semicolon after. W/ NODEFAULTLIB on.
STUXNET = winapi getprocaddress loadmodule dll on NTDLL kernel WINAPI32 functions.
Depends.exe dependency walker
lib.exe /list:DLL/LIB | findstr strtofind
Assembly: WebAssembly + Emscripten
Use godbolt.org for Compiler Explorer to analyse assembly code.
CPP React
CopperStone w/e
libfat/reactos

Things from the past:
LIB+DLL = Linked Libraries, Shared (DLLs)
LIB+EXP = Static Libraries.
Static Vs Shared. MT vs MD  vs Debug ( MTd vs MDd)
WXWidgets 3.1 Compilation in 8 configs = 32/64 * Debug/Release * Shared/Static
make sure you create the directories right. Its advised to open up the vc($PlatformToolsetVersion)</wxCompilerPrefix> which was actually mentioned in the readme.
WinDDK/WinSDK/NTNDK
MSVC 2010 + SDK 7
2013 = C+11
2015 = C+14
2017 = C+17 
uCRT/uCRTD/MSVCRT/vcruntime.lib

VC Project Files. 
SLN basically does nothing 
VCXPROJ does it all. Edit it carefully, its like XML but less tolerant. 
Things have to go in the right order.
There is also an inheritance system. That is the parent and you can import other .props files in that, based on the order they will inherit in various rates.
The MSVC dropdowns are finicky and you need to realize theres inheritance there, and clearing is not the same as defaulting.
Also theres multiple configurations, and sometimes brings up the wrong config page.
You can set up additonal property pages with the "Property Manager" window. 

There is a utility called SLN2CMake and now VS2017 supports CMake. That way you can convert over.

Intricacies:
/d2noftol3 on CL.exe Compiler switch to disable remade SSE2 functions. Otherwise Linker issue without the ucrt.
https://stackoverflow.com/questions/19556103/how-to-get-vs2013-to-stop-generating-calls-to-dtol3-dtoui3-and-other-funct/31691179#31691179
Its a SSE primitive of Cvtds2dsi?
Windows uses 16-bit(2 byte) chars. Linux is 32-bit. use w_char or wchar_t

C++ Frameworks
Boost165 (Boost Optional. Boost Threading)
Intel Threading Building Blocks https://www.threadingbuildingblocks.org/
QT
CopperSpice
WX
Nana is a library for cross-platform GUI programming in modern C++ style (on Windows/Linux)
LANGUAGE C++11/14
COMPILER Any Standard C++ compiler(Visual C++ 2013, GCC/MinGW and Clang)


Github Projects Cloned or Starred


C++ Videos watched:

CppCon 2016: Dan Gohman “C++ on the Web: Let's have some serious fun." (WebAssembly)
https://www.youtube.com/watch?v=jXMtQ2fTl4c
Unicode Strings: Why the Implementation Matters
https://www.youtube.com/watch?v=ysh2B6ZgNXk
CopperSpice - C++ GUI Framework
https://www.youtube.com/watch?v=LIiwBNvTllk

No comments: