C compile error

hello can anyone help? :confused:
i make a C code in FreeBSD 5.4 and it succeed to run
the program requires connection to mysql server
when i try to compile it under solaris i get this error message

ld: fatal: file ./lib/libmysqlclient.so: wrong ELF machine type: EM_386

why? and how to solve this problem? thx for any help :smiley:

Have you recompiled the code to run under Solaris? I don't think that your binary if compiled on BSD would run directly under Solaris.

yes, i did recompile it in solaris
the result is ld: fatal: file ./lib/libmysqlclient.so: wrong ELF machine type: EM_386
a friend of mine also said that the problem is then difference of binary
but he don't know how to solve this

Check if this library is compiled for the i386. You can check this by running
the 'file' command. If that is the case, you have to get this library recompiled for your hardware.