Skip to content

Getting undefined reference error when trying to compile dump_json_ast.cpp #124

@akshit24

Description

@akshit24

I built the libgraphqlparser from source . All the required files (AstNode.h, GraphQLParser.h and c/GraphQLAstToJSON.h) are generated and present in the same directory. When I'm trying to compile dump_json_ast.cpp, I'm facing the following error:

/tmp/cchrLFw4.o: In function main: dump_json_ast.cpp:(.text+0x63): undefined reference to facebook::graphql::parseFile(_IO_FILE*, char const**) dump_json_ast.cpp:(.text+0xe9): undefined reference to graphql_ast_to_json collect2: error: ld returned 1 exit status

I verified and all the required files are already built and present. I'm not sure why the compiler is not able to link the reference.
Use Case : I just need to have a sample graphql query parsed and print the corresponding json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions