undefined symbol with flex/bison

Posted on 2009-05-01
Last Modified: 2012-05-11
I am trying to write two parsers using bison/flex.  I can get the parsers to work independantly but i need both of them in the same executable.  So i used the -P and -p options for flex and bison respectively, giving them "aef".  Everything compiles fine but during runtime i get  

symbol lookup error: <lib name>: undefined symbol: aefin

i changed the declarations to

extern "C" FILE* aefin;
extern "C" int aeflex();
extern "C" void aeferror(const char*);
extern int aefparse(void*);

instead of yyXXX but i still get the undefined symbol error.

Any help would be greatly appreciated.
Question by:jaarshad
    1 Comment

    Accepted Solution

    Problem solved!  I had a mistake in the Makefile.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
    This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
    The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
    Video by: Grant
    The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now