[LLVMdev] File reading in LLVM 2.8

Duncan Sands baldrick at free.fr
Tue Jan 18 06:47:06 PST 2011


Hi Abhirup, please reply to the mailing list and not just to me personally
(that way others can answer too, and the discussion is archived which helps
other people with the same problem).

> How to compile with -fPIC? I am new to llvm so can you please elaborate?

This has nothing to do with LLVM: -fPIC is a gcc option needed to build code
that is to be part of a dynamic library.  So just add it to the other options
you use when compiling your program.

Best wishes,

Duncan.

>
> Abhirup Ghosh
> M. Tech
> Department of Computer Science&  Engg.
> IIT, Bombay
> email - abhirupju at gmail.com , abhirup at cse.iitb.ac.in
>
>
>
> On Mon, Jan 17, 2011 at 2:41 PM, Duncan Sands<baldrick at free.fr>  wrote:
>> Hi Abhirup,
>>
>> `(anonymous
>>> namespace)::Hello::update_sec_read(char const*)' can not be used when
>>> making a shared object; recompile with -fPIC
>>
>> did you compile it with -fPIC ?
>>
>> Ciao, Duncan.
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>




More information about the llvm-dev mailing list