Shared Linux Library converted to FreeBSD one - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Shared Linux Library converted to FreeBSD one

archwndasarchwndas Posts: 7Member
Hi there,
I was wondering if one could do the following. I have some shared library compiled natively in 64bit Linux with the gfortran compiler. I new this was not going to work but I took that library and try to write a simple code which calls it in FreeBSD. Then compile the main.cpp natively in FreeBSD and tried to link the main.o with the which was compiled in Linux and it is a native Linux library. I could not link. I got errors.

Do not please tell me to compile the executable in Linux and run it in FreeBSD through the Linux compatibility ABI. I do not want to run a Linux executable in FreeBSD. I do not care. I want to be able to compile code in FreeBSD and link it with this Linux library. In order to do this I should be able to remove any code related to Linux and replace it with the corresponding code (from the object file) a freebsd library should have.

Anyways I could achieve that?

Sign In or Register to comment.