<br><br><div class="gmail_quote">On Thu, Feb 18, 2010 at 12:16 PM, kalyan ponnala <span dir="ltr"><<a href="mailto:ponnala.kalyan@gmail.com">ponnala.kalyan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I am trying to create an small project using visual studio. <br>I would like to know how to create a project with two '.c' source files. The first .c file should have the main() program and a function declaration and function call in it.<br>

The second .c file should contain the function definition. <br>I tried doing that using visual studio. It can compile and understand that the function definition is in a separate .c file (but in the same project folder). But when I tried to compile the same program with<br>

 clang -c main.c -emit-llvm -o main.bc<br clear="all">lli main.bc<br><br>It gave me this error:<br>LLVM ERROR: program used external function 'functioncall' which could not be resolved!<br><br>could you tell me how to debug these kind of projects which have the function definitions in a separate .c file ??<br>

<br></blockquote><div><br>(Should've replied to everyone.)<br><br>The IDE hides a lot from you. What it's really doing is calling cl.exe with both files (either at once or separately).<br><br>Try:<br><br>clang -c other.c -emit-llvm -o other.bc<br>
lli main.bc other.bc <br></div></div><br>