Monday, July 4, 2016

PE 64 vs 32 bit, std::data() vs c_str, version replace in csproj, CLang


PE headers in DLL telling x86 vs. x64:
x86:
PE  L
x64:
PE  d†

Better use std string data():
std string c_str() is null terminated char only convertion, must use data() if source is encoded from binary data.

Clang and MinGw:
VS 2015 update 3 bring down Clang in a checkbox "Clang with MS codeGen", using LLVM for cross platform, Low Level VM
clang, clang++ are under "program files .. visual studio vs" directory and some androi directory after update 3
MinGW is Windows Implementation of gcc


csproj and Nuget packages.config version changes
find . -type f -print | xargs grep "1.6.0.1"
$ sed -i 's/1.6.0.1/1.6.0.2/g' project1.csproj
$ find /proj/code -type f -exec sed -i 's/1.6.0.1/1.6.0.2/g' {} \;

#!/bin/bash
      for fl in *.php; do
      mv $fl $fl.old
      sed 's/FINDSTRING/REPLACESTRING/g' $fl.old > $fl
      rm -f $fl.old
      done

No comments:

Post a Comment