Displaying 5 results from an estimated 5 matches for "some_test_func".
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
kirill havok wrote:
> Hi Gordon,
> I wrote a small example, but while running I get an error("Tied to
> execute an unknown external function"), where I am wrong?
>
I think the problem is that some_test_func() is a C++ function, so its
name is being mangled during compilation.
To fix it, I think you want to add a declaration telling the compiler to
treat some_test_func() as a C function. Something like the below will work:
extern "C" {
int some_test_func(int);
}
int some_test_func (...
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
Hi Gordon,
I wrote a small example, but while running I get an error("Tied to
execute an unknown external function"), where I am wrong?
Thanks in advance.
Kirill.
int some_test_func( int ){
std::cout << "!!!!" << std::endl;
return 8848;
}
int _tmain(int argc, _TCHAR* argv[]){
Module *M = new Module("test");
ExistingModuleProvider* MP = new ExistingModuleProvider(M);
ExecutionEngine* EE = ExecutionEngine::create(MP, false);
std::vector&l...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
...ailing List
> Subject: Re: [LLVMdev] Please help with LLVM C++ integration
>
> Hi Gordon,
> I wrote a small example, but while running I get an error("Tied to
> execute an unknown external function"), where I am wrong?
>
> Thanks in advance.
> Kirill.
>
> int some_test_func( int ){
> std::cout << "!!!!" << std::endl;
> return 8848;
> }
>
> int _tmain(int argc, _TCHAR* argv[]){
>
> Module *M = new Module("test");
> ExistingModuleProvider* MP = new ExistingModuleProvider(M);
>...
2008 Aug 19
0
[LLVMdev] Please help with LLVM C++ integration
On Aug 19, 2008, at 13:36, kirill havok wrote:
> I got very interested in LLVM project, and I decided to start
> writing my own scripting language based on it. By studying the
> documentation, I could not find how to call external function,
> written in C. That is, I have a set of functions written in C/C++, I
> generate code, using LLVM C++ interface, how can I call(or
2008 Aug 19
5
[LLVMdev] Please help with LLVM C++ integration
Hello,
I got very interested in LLVM project, and I decided to start writing
my own scripting language based on it. By studying the documentation,
I could not find how to call external function, written in C. That is,
I have a set of functions written in C/C++, I generate code, using
LLVM C++ interface, how can I call(or register in machine in run-time)
my external functions? Maybe I just missed