Menu

#5 Linker error: Unresolved externals  Edit

2.0
wont-fix
nobody
1 (9)
2018-10-12
2016-09-09
Anonymous
No

Hi Alex, thank you for the great work you shared with us!
When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
(I also noticed to exclude all cpp files from using precompiled headers).

Look at the attached image.

I am using MS VisualStudio 2015 Community Edition with Win7 and working with a C++ project.
The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.

Have you got any idea what I am missing?

Cheers
Sebastian

2 Attachments

Discussion

1 2 3 4 > >> (Page 1 of 4)
  • Anonymous

    Anonymous - 2016-09-09
    • assigned_to: Alex Zhondin --> nobody
     

    Last edit: Anonymous 2018-10-12
  • Alex Zhondin

    Alex Zhondin - 2016-09-09

    Hello Sebastian,

    thank you for such positive estimation of my work.

    The first two error lines tell us that you already have main function in your peoject. If you look at https://github.com/meyerd/flex-bison-example/blob/master/calc.y you will see that it defines its own main function. So you don't need to define your own.

    The last errors is a common errors for flex/bison begginers.
    You can see answer for example here http://stackoverflow.com/questions/1811125/undefined-reference-to-yywrap .
    Short answer is just add "%option noyywrap" line to the beginning of the calc.l file.

    Regards,
    Alex

     

    Last edit: Alex Zhondin 2016-09-09
  • Anonymous

    Anonymous - 2016-09-15

    Hello Alex,

    thanks for your response. I tried out your suggestions and it worked!

    Cheers,
    Sebastian

     

    Last edit: Anonymous 2018-10-12
  • Anonymous

    Anonymous - 2018-10-12
    • labels: --> 1
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,11 @@
     Hi Alex, thank you for the great work you shared with us!
    -When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
    +When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
     (I also noticed to exclude all cpp files from using precompiled headers).
    
     Look at the attached image.
    
     I am using MS VisualStudio 2015 Community Edition with Win7 and working with a C++ project.
    -The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.
    +The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.
    
     Have you got any idea what I am missing?
    
    • status: closed --> unread
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,2 @@
    +acunetix.txt (0 Bytes; text/plain)
     error_linker.PNG (17.7 kB; image/png)
    
     
  • Anonymous

    Anonymous - 2018-10-12
    • labels: --> 1
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,11 @@
     Hi Alex, thank you for the great work you shared with us!
    -When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
    +When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
     (I also noticed to exclude all cpp files from using precompiled headers).
    
     Look at the attached image.
    
     I am using MS VisualStudio 2015 Community Edition with Win7 and working with a C++ project.
    -The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.
    +The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.
    
     Have you got any idea what I am missing?
    
    • status: closed --> accepted
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • labels: --> 1
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,11 @@
     Hi Alex, thank you for the great work you shared with us!
    -When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
    +When I follow your guide to "setup custom build rules" step-by-step, I run into linker errors.
     (I also noticed to exclude all cpp files from using precompiled headers).
    
     Look at the attached image.
    
     I am using MS VisualStudio 2015 Community Edition with Win7 and working with a C++ project.
    -The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.
    +The sample files 'hello.y' and 'hello.l' are containing the sample you provided here: https://github.com/meyerd/flex-bison-example.
    
     Have you got any idea what I am missing?
    
    • status: closed --> open
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: accepted --> closed
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: accepted --> pending
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: accepted --> wont-fix
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: pending --> accepted
    • Milestone: 1.0 --> 2.0
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: accepted --> pending
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: pending --> closed
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
  • Anonymous

    Anonymous - 2018-10-12
    • status: pending --> unread
    • Milestone: 1.0 --> 2.0
     
  • Anonymous

    Anonymous - 2018-10-12
    • status: closed --> open
    • Milestone: 1.0 --> 2.0
     
  • Anonymous

    Anonymous - 2018-10-12

    1

     
1 2 3 4 > >> (Page 1 of 4)

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB