便携式STL实现? [英] Portable STL implementation?

查看:88
本文介绍了便携式STL实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我正在寻找只有头文件的STL实现。我知道供应商

提供一个编译器,但通常他们要么是有问题,要么有其他问题。

我的问题是在Windows下不同版本的Microsoft

编译器彼此不兼容。这意味着您无法使用版本X编译

文件并与版本Y链接,因为您最终会收到链接器

错误。


我尝试过STLport,但没有成功。我有一些问题得到它

使用AMD64,在Mac OS X下它也没有干净利落地编译。


有什么建议吗?


- John

Hi

I''m looking for a header-file only STL implementation. I know the vendors
provide one with compilers but often they are either buggy or has some other
problems.
My problem is that under Windows the different versions of the Microsoft
compiler are not compatible with each other. This means you can''t compile
file with version X and link with version Y because you end up with linker
errors.

I''ve tried STLport but with lack of success. I have some problems getting it
working with AMD64 and under Mac OS X it doesn''t compile cleanly either.

Any suggestions?

-- John

推荐答案

" John Smith" <乔******** @ x-formation.com>在消息中写道

news:42 ********************* @ dread16.news.tele.dk。 ..
"John Smith" <jo********@x-formation.com> wrote in message
news:42*********************@dread16.news.tele.dk. ..
我正在寻找一个只有头文件的STL实现。我知道
供应商提供了一个编译器,但通常他们要么是错误的,要么是b $ b还有其他一些问题。


您认为免费软件会更好吗?

我的问题是在Windows下不同版本的
Microsoft编译器不是相互兼容。这意味着您不能使用版本X编译文件并与版本Y链接,因为您最终会遇到
链接器错误。


你很少能用*任何*两个主要版本的

编译器来做到这一点。

我'尝试过STLport但是没有成功。我有一些问题
让它与AMD64一起工作,在Mac OS X下它也不能干净地编译

有什么建议吗?
I''m looking for a header-file only STL implementation. I know the vendors provide one with compilers but often they are either buggy or has some other problems.
And you think free software is going to be better?
My problem is that under Windows the different versions of the Microsoft compiler are not compatible with each other. This means you can''t compile file with version X and link with version Y because you end up with linker errors.
It''s rare that you can do that with *any* two major versions of a
compiler.
I''ve tried STLport but with lack of success. I have some problems getting it working with AMD64 and under Mac OS X it doesn''t compile cleanly either.
Any suggestions?




最接近您想要的东西可能是我们的Unabridged Library。

它提供了基本相同的库(当然包括STL)

VC ++版本来自V6上。您还可以在各种平台上获得多个版本的

gcc。


但是费用



The nearest thing to what you want is probably our Unabridged Library.
It supplies essentially the same library (including STL, of course) on
VC++ versions from V6 on. You can also get it for multiple versions of
gcc, on a variety of platforms.

But it costs





PJ Plauger

Dinkumware,Ltd。
http://www.dinkumware.com

.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com




"约翰史密斯 <乔******** @ x-formation.com>在消息中写道

news:42 ********************* @ dread16.news.tele.dk。 ..

"John Smith" <jo********@x-formation.com> wrote in message
news:42*********************@dread16.news.tele.dk. ..


我正在寻找一个只有头文件的STL实现。我知道供应商提供了一个编译器,但通常他们要么是有问题,要么有其他问题。
我的问题是在Windows下不同版本的Microsoft
编译器彼此不兼容。这意味着您无法使用版本X编译
文件并与版本Y链接,因为您最终会遇到链接器
错误。
Hi

I''m looking for a header-file only STL implementation. I know the vendors
provide one with compilers but often they are either buggy or has some
other
problems.
My problem is that under Windows the different versions of the Microsoft
compiler are not compatible with each other. This means you can''t compile
file with version X and link with version Y because you end up with linker
errors.




Do你真的需要单独编译和链接吗?你的代码本身应该不会对STL的实现有任何依赖,除非你是使用特定于供应商的扩展的
,据我所知。如果代码是

便携式,那么它不会在任何系统上完善和链接吗?移植便携式移动时我可以想到的唯一变化是
系统之间的代码与

项目设置相关。或者makefile,与您编写的代码无关。对于我的所有可移植代码,我有相同的来源,

包括任何STL代码或文件包含。只有项目(Code Warrior,

VC ++等)不同(当然还有任何平台特定的东西,比如图形

或鼠标处理)。但也许我很想念你的意思......?


-Howard




Do you really need to compiler and link seperately? Your code itself should
not have any dependency on the implementation of the STL, unless you''re
using vendor-specific extensions, as far as I can tell. If the code is
portable, then won''t it comple and link on any system? The only changes I
can think of when porting "portable" code between systems are related to the
"project settings" or "makefile", which are not related to the code you
write. For all my code that is portable, I have identical sources,
including any STL code or file includes. Only the projects (Code Warrior,
VC++, etc.) differ (and of course any platform-specific stuff, like graphics
or mouse handling). But perhaps I''m missing your point...?

-Howard



这篇关于便携式STL实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆