Skip to main content

Featured

Build docker image from multiple build contexts

Build docker image from multiple build contexts Building a docker image requires specifying a source of truth to include in the image from a local directory or a remote git repository. In the previous version, the docker BuildKit allows users to specify the build context from a single source of truth only. However, the engineers may need to have the context from different locations based on the type of files. For instance, icons, images or other resources that are not included in the same package, including the resource from other docker images. Fortunately, the Docker Buildx toolkit supports multiple build context flag for Docker 1.4. Let's learn how to use this new feature. The following list is a shortcut for jumping into a specific topic handy. What version of Docker is this tutorial targeting? How to specify the version of Dockerfile frontend? Ho

[VS神奇事件]pThread->InitInstance()發生crash事件

自從前述的libary link被修改事件被處理完成之後,再度又發生一個非常神奇的事件。

就是原本一個console application在run-time的時候crash了,crash的地方是在pThread->InitInstance()的地方。

在debug模式下發現這邊的pThread其實是一個NULL,所以會當掉也是很正常的。

然而這個pThread是放在AfxWinMain()底下,而AfxWinMain是在winmain.cpp裡面。

問題來了,一個console程式為何會需要用到winmain這個函式呢?

正在苦無解法的情況下,google到了這篇文章(http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/0ba47667-5067-4dc9-b667-87d40d7e2566)。

所以就照他的方法到了link底下的subsystem去檢查設定(Project->Properties->link->subsystem)。

結果,Bingo!!
M$的產品總是充滿驚喜阿,subsystem的設定竟然是winodws阿。

一整個無言,為何好端端的console程式會變成windows程式呢?

更何況3個月前他還是console阿,所以最後就把subsystem的設定調回console後,程式又可以正常運行了。

所以,M$讓我們的生活總是充滿驚喜阿!!!XD

Comments

Popular Posts