문제

I built TAO 1.6a downloaded from OCI in AIX 5.3. I was built successfully. However, I could only see .so files in $ACE_ROOT/lib. How to build it to get .a files? I have built 1.5a version and it gave me .a files. Is there any make flag? Please give ma sample.

Thank you.

도움이 되었습니까?

해결책

TAO1.5 and older versions produce .a (archive library file) for each library. For example: libTAO.a, libTAO_CosNaming.a, libTAO_PortableServer.a, libTAO_AnyTypeCode.a

I think why all libraries are put inside archive files is that the library names are the same as default, "shr.o".

The fact is all library names are the same but only the archive names are different.

For example:

Archive Name            Library Name
------------            ------------
libTAO.a                  shr.o
libTAO_CosNaming.a        shr.o
libTAO_PortableServer.a   shr.o
libTAO_AnyTypeCode.a      shr.o         

But, TAO1.6 and newer versions produces libraries with different names. For example: libTAO.so, libTAO_CosNaming.so, libTAO_PortableServer.so, libTAO_AnyTypeCode.so

And, those libraries are not put inside archive files (.a). That is why I cannot find ".a" files inside $ACE_ROOT/lib.

If you want to create .a files for all libraries, please do the following steps. I don't know if there are more easier ways out there. If so, please share here.

In $ACE_ROOT/lib, all .so files are symbolic linked from their original project directories.

So, find out from where. I will do libACE.so as example.

$cd ACE_ROOT/lib
$ls -lrt libACE.so
--> libACE.so -> ../ace/libACE.so.5.6a_p13

ok, now, I know the source of the file and will go there.

$cd ../ace

create .a file and put the source inside it. usage - "ar -rv archivelibname.a sourcelibname"

$ar -rv libACE.a libACE.so.5.6a_p13

and go back to $ACE_ROOT and symbolic link the .a file

$cd $ACE_ROOT/lib
$ln -sf ../ace/libACE.a libACE.a

That's all. But, you have to do those steps for all libraries and it is tiring.

Edit: I just did not know -brtl

Compile projects using -brtl parameter and they will work well with .so libraries.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top