[LLVMdev] Calling functions
Álvaro Castro
alvcastro at yahoo.es
Mon Feb 25 02:03:36 PST 2008
>
I'm
trying
LLVM
for
generating
code
and
I
found
something
I
cannot
>
figure
out
or
find
in
the
documentation:
>
>
But
if
I
want
to
call
any
function
inside
a
C++
namespace
I
don't
>
find
the
way
to
do
it.
Imagine
you
want
to
call
>
>
othernamespace::globalFunction()
>
>
How
should
I
do
it?
>
I've
tried
all
the
linkage
types,
but
it's
clear
that's
not
the
>
solution.
Hi
Álvaro,
Google
for
C++
name
mangling
to
understand
why
what
you're
attempting
doesn't
work.
Looking
at
the
output
of
llvm-gcc
may
help
you
get
it
right,
but
it's
probably
easier
to
write
C
wrappers
for
your
C++
code.
—
Gordon
***********************
Thanks for your answer,
Actually what the functions working had in common was that they were C functions. Makes perfect sense.
The best solution for my problem seems wrapping with C functions. I've tested it and now works correctly.
Best regards,
.alvaro.castro.
______________________________________________
¿Con Mascota por primera vez? Sé un mejor Amigo. Entra en Yahoo! Respuestas http://es.answers.yahoo.com/info/welcome
More information about the llvm-dev
mailing list