warning: <tool>: 'linker' input unused when '-fsyntax-only' is present

I'm writing a tool using libclang. I've used one of Doug Gregor's talks about libclang as a tutorial. One thing is really bugging me and I cannot figure out what I've done wrong. Every time I run the tool I get this output:

File(FDC34)warning: <tool>: 'linker' input unused when '-fsyntax-only' is present

The code looks something like this:

I'm invoking the tool with just an input file.

I've tried to search the web but I've been unable to find an answer that provides a working solution.

I'm writing a tool using libclang. I've used one of Doug Gregor's talks
about libclang as a tutorial. One thing is really bugging me and I
cannot figure out what I've done wrong. Every time I run the tool I get
this output:

File(FDC34)warning: <tool>: 'linker' input unused when '-fsyntax-only'
is present

The code looks something like this:

#include <stdio.h>#include "Index.h"int main (int argc, const char *argv[] - Pastebin.com

I'm invoking the tool with just an input file.

You are passing argv/argc directly as compiler arguments, but these include the name of the executable of your tool in the first string.

You're right. Removing the name of the executable solved the problem, thanks.