openwarcom 使用心得

作者在 2008-08-25 13:21:50 发布以下内容
openwarcom 使用心得
1. 之前watcom 中创建的 静态库*.lib 文件在现在的openwatcom能正常使用
2. 对大小写做出了更加严格的限制, openwatcom中要求函数名的大小写必须一致
经验 | 阅读 4283 次
文章评论,共2条
vfdff(作者)
2008-08-25 13:36
1
静态库链接方法:<br />
1:# pragma library (&quot;..\lib386\watlib.lib&quot;); // 分号结尾<br />
2:# pragma comment(lib,&quot;vclib.lib&quot;) // 无分号
vfdff(作者)
2008-08-26 23:47
2
#include &lt;iostream&gt;<br />
#include &lt;string&gt;<br />
int main()<br />
{<br />
&nbsp;&nbsp;std::string word;<br />
<br />
&nbsp;&nbsp;std::cin &gt;&gt; word;<br />
&nbsp;&nbsp;std::cout &lt;&lt; word;<br />
&nbsp;&nbsp;return 0;<br />
}<br />
simple string program above won't compile with the OWSTL included with Open Watcom v1.4--v1.7. This is because OWSTL does not yet support I/O operators for std::string. The intention is to add such operators when the iostreams library is modernized. In the meantime you have to do I/O on strings using older methods and then convert the old-style strings to and from std::string.
游客请输入验证码
浏览1940854次