working_on_windows

Some tips about working on windows

Terminal

dir is similar to the ls command in linux

when you want to jump to specific dir, just type C: or D:, which will be good.

set command can be used to set the environment variable.

Cmake

Since the gui is the first citizen in windows, just try to use its gui direactly instead of ccmake.

Visual studio

The c/c++ project programming on windows is depedent on the visual studio. After installing the visual studio properly, we have everything we need to build project.

After using cmake to build the project, there is sln file (solution file). We can then using the visual studio to open the solution file.

Looking at the source code might not be conveneint. Since in solution project, what we actually see is the target in cmake, if we want to check specific source file, we need to find it through target->source. This is different with vscode, we can jump to specific position in the dir tree when we open a specific file.

Adding watcher

If you want to watch a variable, just a find it and click the right button, then add watch, we can even watch the content pointed by pointer. Onw good thing is to watch the raw array, just add ,[numer of elements you want to watch] then there is a new generated array, we can watch it easily.

Default dir

The default working dir is the build dir instead of Debug dir, just right click the project you want to run, and then right click-> open folder in file explorer.

Windows office

表格合并

引用与更新域

Other thoughts

The bad thing about the gui related operation is that it is hard to reproduce things. That’s why we prefer to use the linux for development.

Mac地址配置

办公室的电脑联网的时候是mac地址与ip地址绑定的,电脑重装了系统之后发现上不了网了,在同事的提醒下,发现原来的mac地址是手动修改过的(虽然物理网卡的mac地址不变,但是这个mac是可以从软件层面手动修改的,还是挺有意思的),重装系统之后回复到了默认的设置,如果想再改回去的话需要 控制面板-》网络连接-》以太网-》右键属性-》在上半部分点击配置-》在属性列表中-》本地管理地址-》然后输入mac地址,并在对应的位置中输入mac信息,中间不需要加横杠,这样就好了。

推荐文章