Daily Archives: November 20, 2007

solution: 不能在space上发表日志

我前面经常遇到登陆进去后,却不能发表日志,发表日志的链接是灰的。前面有过调查,大致归因于中国的服务器好像有问题,一些js脚本可能无法传到我的机器。到美国后,同时用的一个台式机访问和发表空间日志没有任何问题,但笔记本仍有同样问题,有时候能发表,大部分时间却不能,很不稳定。无奈我前面都是通过email来发表日志,但总归是比较麻烦,一些信息通过email过去好像要审查,无法发布出来。
刚才在下班之后突然想来,如果我改成英语,那么将直接从美国这边的服务器下载,可能就没有问题了。
1)在浏览器的语言选项里(Internet Options/Lanugages)加入英语(美国),并移到最上面;重新打开Google时,发现Google的界面已经是英语。但登陆到空间,发现仍是中文,发表日志仍无效。
2)找到一个帖子,说可以更改space的默认语言,点击 http://spaces.live.com/?mkt=en-us 进去,发现果然是英语了。退出,再打开,还是英语,没变回来。估计在Cookie里存储下来了。
3)再进去发现果然发表日志的链接可用了。
前面跟人讨论说到这个问题,总怀疑我的机器中毒或有木马,因为我习惯是不打开杀毒程序。但自己感觉机器还是比较干净,应该问题不在这。现在这个结果表明,是国内的服务器有问题(或者是那个什么Great Wall Firewall等东东在搞破坏)。

Nov 29, 2007: I also found installed IE 7 will also solve this problem.

Make MinGW dll to be used by MSVC application

Make MinGW dll to be used by MSVC application
Zhuotong Nan, [email protected]

1. We cannot directly use dynamic libararies generated by MinGW in MSVC application
2. To enable this, it’s easy. In eclipse, open project property window, go to the MinGW c++ settings page, and enable –output-def by giving a def name.
3. Compile, this time it will generate a def file along with the dll file.
4. In msvc command window, type "lib /machine:x86 /def:def_file.def". It will create a lib file and a exp file.
5. In msvc ide, import this lib file as the common dll generated by MSVC.
6. The above described for only C functions, or c++ functions with extern "C" keywords. all c++ functions and any functions inside c++ class cannot be called by MSVC in this means. For information to address this so-called ABI (Application Binary Interface) issues between c++ compilers, please google with "ABI C++". In a short word, there is no easy way to do the interoperation. But there might be some workarounds.

Reference:
1. http://www.mingw.org/MinGWiki/index.php/MSVC-MinGW-DLL