Displaying 2 results from an estimated 2 matches for "libllvmgcc".
2012 Jan 22
2
[LLVMdev] CreateGlobalStringPtr giving linker errors
...ot;top", context);
llvm::IRBuilder<> builder(context);
llvm::Value *helloWorld = builder.CreateGlobalStringPtr("hello world!\n");
}
And here's the error:
g++ e.cpp /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/libllvmgcc.dylib
Undefined symbols for architecture x86_64:
"llvm::ConstantExpr::getGetElementPtr(llvm::Constant*,
llvm::ArrayRef<llvm::Value*>, bool)", referenced from:
llvm::ConstantExpr::getInBoundsGetElementPtr(llvm::Constant*,
llvm::ArrayRef<llvm::Value*>)in ccFB7xjg.o
&qu...
2012 Jan 22
0
[LLVMdev] CreateGlobalStringPtr giving linker errors
Probably your g++ compiles x86_64 binary by default, but i686 dylib is supplied?
Try:
g++ -m32 e.cpp /Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin10/4.2.1/libllvmgcc.dylib
- D.
2012/1/22 Arpan Sen <arpansen at gmail.com>:
> Hi,
>
> I am trying to use some LLVM API in my C++ code, and I end up getting linker
> errors. I am working on Apple MacOSX Lion. Using g++ for the compile. It is
> the CreateGlobalStringPtr which is throwing the error...