Displaying 3 results from an estimated 3 matches for "printintptr".
2010 Oct 04
0
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
...om within the executable itself, if you want to link in
something that is exported from itself, you can do this:
export "C" {
void printInt(int i) { printf("%i", i); }
typedef void(*printIntType)(int);
}
int main(void) {
HMODULE self = GetModuleHandle(0);
printIntType printIntPtr = (AddFunc)GetProcAddress(self, "printInt");
(*printIntPtr)(42);
}
And if you want to check for something exported from any currently
loaded module, EnumProcessModules can be used for that to get all
modules loaded into the current process.
So is this really all that is needed to get...
2010 Oct 04
1
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
>>> Any help will be much appreciated. Thanks!
>> Windows does not support dynamic linking. You will need to resolve
>> externals by hand.
>
> Why would it not support dynamic linking? What about loadlibrary and
> its kin are not sufficient to handle this?
Well, you cannot easily export stuff from an executable and this is
the main issue here.
(And you cannot e.g.
2010 Oct 02
4
[LLVMdev] LLVM ERROR: Program used external function 'printd' which could not be resolved!
Hi
Buit the Kaleidoscope example under MinGW and everything runs fine except
when I try the following example in Chapter 6:
extern printd(x);
printd(123);
where printd is the library function defined in C as
extern "C"
double printd(double X) {
printf("%f\n", X);
return 0;
}
The error message is:
LLVM ERROR: Program used external function