- const could not be specified for a function parameter. const could be specified in C/C++ so that compilation error is shown if modification is attemped. This is not possible in golang.
- Template is not available
Monday, December 17, 2018
Limitation of golang
The following are not yet feasible in golang compared to C/C++ (according to my understanding in Dec 2018):
Friday, December 14, 2018
Protocol Buffer processing with Golang
Assuming that you have installed Golang and protoc, you just need to run the following command
You should be able to generate the corresponding protocol buffer implementation with the following command
References:
go get -u github.com/golang/protobuf/protoc-gen-go
You should be able to generate the corresponding protocol buffer implementation with the following command
protoc --go_out=. *.proto
References:
Wednesday, December 12, 2018
Form a new repository with a directory in Git repository and upload
The following are the steps:
git filter-branch --subdirectory-filter <target_directory>
git remote set-url origin <new_git_url>
- Check whether remote url is changed:
git remote -v
git push
Monday, December 10, 2018
Setup Visual Studio Code on Ubuntu for C++ Debugging
- Install Visual Studio Code
- Update CMake to 3.7 or above
- "
cmake --version
": Check cmake version with execution of "cmake --version
" on terminal. The following steps can be skipped if the version is 3.7 or above - Visit https://cmake.org/download/ and download the latest binaries, eg.
cmake-3.12.4-Linux-x86_64.sh
- "
chmod +x /path/to/cmake-3.12.4-Linux-x86_64.sh
" (use your own file location here, chmod makes the script executable) - "
sudo apt remove cmake
": Remove existing version of cmake - "
sudo /path/to/cmake-3.12.4-Linux-x86_64.sh
" (you'll need to press y twice) - The downloaded cmake package will be found in directory "cmake-3.12.4-Linux-x86_64". You could consider to move the cmake package into /opt with "
sudo mv /path/to/cmake-3.12.4-Linux-x86_64 /opt
". This step is optional. - If you have moved the package under "/opt", create soft link with "
sudo ln -s /opt/cmake-3.12.4-Linux-x86_64/bin/* /usr/local/bin
". If you have not, create soft link under "/usr/local/bin" for the cmake binary tools in your desired directory.
- "
- Install following Visual Studio Code Plugins
- "C/C++" from Microsoft
- "CMake" from twxs
- "CMake Tools" from "vector-of-bool"
Wednesday, December 5, 2018
Clone SVN with Git
git svn clone <svn_repo_path>
git remote add origin <git_repo_path>
git push --set-upstream origin master
git remote add origin <git_repo_path>
git push --set-upstream origin master
Subscribe to:
Posts (Atom)