[LLVMdev] mixed bc file
chongzhilin at 163.com
Mon Oct 20 00:23:21 PDT 2008
I have a question with llvm-gcc and llvm-gfortran.
Is it possible that llvm-ld can combine different bc files compiled from C programme and Fortran Programme together?
Compile a c program into llvm bc file by the task:
# llvm-gcc -emit-llvm test.c -c -o test.bc
and then compile a fortran program into llvm bc file by the task:
# llvm-gfortran -emit-llvm testf.f -c -o testf.bc
And then use llvm-ld to combine two bc files into a single bc file as follows:
# llvm-ld test.bc testf.bc -o testp.bc
ERROR: Program used external function '_gfortran_st_write' which could not be resolved!
I have also tried to link gfortran dynamic libraries like this and here is a error message:
# llvm-ld test.bc testf.bc -lgfortran
llvm-ld: error: Cannot find library 'gfortran'
Note:gcc can find library 'gfortran'.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev