//s_request_view() constructor is declared as below
namespace Identity_VIEW
{
Published_view_identity s_request_view("SAMPLE");
};
//The constructor is called in another source file as below,
bind_view(Identity_VIEW::s_request_view);
這個代碼在windows上工作正常,但在SBC(PowerPC)上s_request_view作爲NULL傳遞。爲什麼全局變量沒有用字符串初始化我在extern中給出的變量
任何人都可以請幫我找出爲什麼它的行爲不同?
我們可以看到Published_view_identity及其構造函數的屬性 – Mark 2010-06-29 04:44:13
另外,bind_view被「普通」代碼或另一個全局構造函數? – 2010-06-29 04:48:27
不知何故,我敢打賭,在另一個全球構造函數。 – 2010-06-29 06:38:39