Linux program in FreeBSD

Trying to run my program in FreeBSD OS, I have the following results:

Code:
$ ./myprogram

ELF binary type "0" not known

./myprogram: 1: Syntax error: "&" unexpected (expecting ")")

$ file myprogram

myprogram: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 

dynamically linked (uses shared libs), for GNU/Linux 2.6.15, 

not stripped

The program is built in GCC on Ubuntu computer. What can I do? Can I build the program for FreeBSD on my Ubuntu computer by changing some build options, or I need to build it in FreeBSD OS? Maybe there is some way to convert executable to format recognized by FreeBSD?
 
If it's build on ubuntu, it's linked with Ubuntu libraries.
ELF executables also are different (in header)

you need to recompile your app on FreeBSD if you want to use it.


There is no way to convert it to FreeBSD, it's impossible.
What you could try is to run it in FreeBSD using Linux Emulation.... (but I have never used it, so I don't know the details.) It still may not run, because FreeBSD doesn't offer Ubuntu as Linux Emulation, but some other distro...

Best you can do is recompile it
 
Back
Top