Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6129395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:44:16+00:00 2026-05-23T16:44:16+00:00

I am going to port the C project that was for unix into windows.

  • 0

I am going to port the C project that was for unix into windows. So far, I could make it compile but not build . The problem I am getting is , some of the functions which are declared in the header files are defined in the yacc files.so I am getting the following errors:

 error LNK2001: unresolved external symbol function_name

I am adding .y and .l files in the source directory of the project.I think I could not port yacc files into windows version or am I doing something stupid.I search it on web but could not get proper tutorial for it.Could you please let me know

  1. How could I add .y or .l files in the project.
  2. How would I make those file compatible to the windows?
  3. How can I link them with other object files.

EDIT

I tried with changing the the .l files into the .yy.c files using the flex.exe.Following is the command for it

     c:\> flex.exe name.l

Supposing that both the flex.exe and name.l are in C;>.And I loaded those all those files .l .y(previously present for parsing in unix system) .yy.c(corrsonding yacc file for windows) in the solution of previously exisiting project. Once I compile,I get the following

 Can't read the header file  parserheaderfile.h 

This is the header file which needs to be generated by the bison in the unix
system. So I think I am not able to make the bison compatible for windows .So please him me how can I solve this problem?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:44:16+00:00Added an answer on May 23, 2026 at 4:44 pm

    You need to add custom build rules for your .y and .l files. To do this, you need to

    1. create one dummy .c file for the .l file and the .y file
    2. add the .l, .y and both .c files to the project
    3. right click on the .l file and select properties
    4. Configuration->All Configurations
    5. General->Item Type->Custom Build Tool
    6. Apply
    7. Custom Build Tool->General->Command Line->flex -olexer.c lexer.l
    8. Custom Build Tool->General->Outputs->lexer.c
    9. Custom Build Tool->General->Additional Dependencies->parser.y parser.c
    10. Apply
    11. select the .y file in the solution explorer
    12. Configuration->All Configurations
    13. General->Item Type->Custom Build Tool
    14. Apply
    15. Custom Build Tool->General->Command Line->bison -oparser.c parser.y
    16. Custom Build Tool->General->Outputs->parser.c parser.h

    Also you need to have flex.exe, bison.exe and m4.exe in the system search path. Another drawback is that VS does not get the dependencies right, so when you change something in the parser or lexer files, you need to manually rebuild the project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a port of Rx called mono-reactive that contains a MonoTouch project but
Apologies in advance for the possible flame thread, but that's not what I'm going
Going through happstack-lite tutorial : we build functions that have return type of ServerPart
I have a project that we are looking to port from Visual studio 6
I'm going to port a large C++-Project to x64 (some parts of it are
Going mad now. I have a MVC solution that i've upgraded from MVC 1
I am starting one POS (Point of sale) project. Targeting system is going to
I'm currently porting some windows code and trying to make it available for use
I've got a medium scale project (a turn-based game) that's currently written in C/C++.
Hey, so I'm trying to build a simple lan game using sockets (not tcpclient

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.