由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - C++ class library
相关主题
A C++ compiler related interview questionprivate destructor
An interesting C++ compile errorPython problem on 64 bit Linux
Linux and Shared objectCan LGPL, Boost library be used in commercial software developing?
AIX, C-shared library, and g++c++ dynamic cast
请问c++为什么会编译失败?C array
C++小插曲A tech question (转载)
问个虚函数的作用谁来解释一下这个是compiler问题吗?
问个virtual table 的问题关于Makefile的一个问题
相关话题的讨论汇总
话题: c++话题: file话题: so话题: library话题: does
进入Programming版参与讨论
1 (共1页)
n**d
发帖数: 9764
1
C file can be built to .o file which can be added to .a or .so file as
function library by ar command. How does C++ organize the class code? Does
it use .a or .so too?
a**a
发帖数: 416
2
Virtually you can think that C++ codes were translated to c codes and then
compiled to .o file, although in reality there is no such translation.
So the answer is that it is the same as c codes. The only difference is that
.o/.a/.so files generated by c codes can be directly used by other compilers,
while c++ generated binary files can be only used by the same C++ compiler.

【在 n**d 的大作中提到】
: C file can be built to .o file which can be added to .a or .so file as
: function library by ar command. How does C++ organize the class code? Does
: it use .a or .so too?

n**d
发帖数: 9764
3
use ar command to do it too?

that
compilers,

【在 a**a 的大作中提到】
: Virtually you can think that C++ codes were translated to c codes and then
: compiled to .o file, although in reality there is no such translation.
: So the answer is that it is the same as c codes. The only difference is that
: .o/.a/.so files generated by c codes can be directly used by other compilers,
: while c++ generated binary files can be only used by the same C++ compiler.

1 (共1页)
进入Programming版参与讨论
相关主题
关于Makefile的一个问题 请问c++为什么会编译失败?
关于C++ STL编译的疑问C++小插曲
question for C++ constant问个虚函数的作用
a question about CAST问个virtual table 的问题
A C++ compiler related interview questionprivate destructor
An interesting C++ compile errorPython problem on 64 bit Linux
Linux and Shared objectCan LGPL, Boost library be used in commercial software developing?
AIX, C-shared library, and g++c++ dynamic cast
相关话题的讨论汇总
话题: c++话题: file话题: so话题: library话题: does