[LLVMbugs] [Bug 9052] New: Kaleidoscope tutorial: JITed code fails to resolve functions defined in toy.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 25 12:06:36 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9052

           Summary: Kaleidoscope tutorial: JITed code fails to resolve
                    functions defined in toy.cpp
           Product: Documentation
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: General docs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: b42-ml at srck.net
                CC: llvmbugs at cs.uiuc.edu


In chapter 4 (and onwards) of the tutorial, when compiling as suggested:

% cd llvm/examples/Kaleidoscope/Chapter4
% g++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3
-o toy
% ./toy
ready> extern putchard(x);
ready> putchard(42);
LLVM ERROR: Program used external function 'putchard' which could not be
resolved!

When compiled using llvm build system by typing "make" in the directory, the
program works as expected. If I add -rdynamic to the g++ command line above,
the example also works, however I'm not sure if this is the right solution.

SVN revision: 124206

% gcc --version
gcc (Debian 4.4.5-8) 4.4.5

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list