Thread: lister project won't compile

  1. #1
    Registered User
    Join Date
    Aug 2023
    Posts
    45

    Red face lister project won't compile

    This project is from 'Ron Mak C++ compiler design'. All the files are in the included zip along with a file, corecrt.h, showing the errors I get when I compile this project. Usually I get errors in the code and the compiler tells me what line went wrong. All I get in this case are many error messages that show up as something wrong in the minGW folders! I did get to where the compiler made .o files of everything but the buffer.cpp. Since this is from an older book on compiler design I'm thinking that the newer compilers have problems with older code. Any feed back on this are well appreciated since I have no idea where to go.
    Maxcy / wt1v
    Attached Files Attached Files

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You have an errant asterisk on line 9.
    Code:
    $ diff BUFFER.CPP buffer.cpp 
    9c9
    <                                                           *
    ---
    >
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    206
    Nice spot, I just downloaded it and saw it after you pointed it out

  4. #4
    Registered User
    Join Date
    Aug 2023
    Posts
    3
    It seems like you're working on a project related to Ron Mak's C++ compiler design, and you're encountering compilation errors that are related to older code. It's not uncommon for older code to have compatibility issues with newer compilers, especially if the code relies on language features or library functions that have changed over time.


    Here are a few steps you can consider to address the compilation errors:


    Review and Update the Code: Carefully review the code in question and look for any outdated or deprecated C++ features. You may need to update the code to be compatible with the C++ standards used by your current compiler.


    Check Compiler Flags: Make sure you are using appropriate compiler flags and options. Older code might require specific flags or settings to compile correctly. You may need to consult the documentation for your specific compiler.


    Library Compatibility: Verify that the code's dependencies and libraries are compatible with your compiler and system. Outdated libraries or dependencies can lead to compilation errors.


    MinGW Version: MinGW (Minimalist GNU for Windows) may have different versions and distributions. Make sure you are using a version of MinGW that is known to work well with the specific code you are compiling.


    Compile in an Older Environment: If updating the code proves challenging, you might consider setting up an older development environment or using a virtual machine with an older compiler that is known to work with the code. This can sometimes be a workaround for compatibility issues.


    Consult with the Community: If you encounter specific errors or issues, consider reaching out to relevant programming or compiler design communities or forums. Others who have worked with similar projects or faced similar challenges may be able to provide guidance.


    Recreate the Environment: If you can identify the specific environment or compiler that was used when the code was originally created, you could try to recreate that environment for compilation.


    Remember that working with older code can be complex, and it may require a good understanding of both the code and the tools you are using. If all else fails, you might need to seek expert advice or consider alternative approaches to achieve your goals.
    Last edited by Salem; 10-24-2023 at 01:17 PM. Reason: spam deleted - last chance saloon kiddo

  5. #5
    Registered User
    Join Date
    Dec 2017
    Posts
    1,633
    Looks like some kind of "meds" link in the signature of the previous post.
    What are the odds that the text is from ChatGPT?
    A little inaccuracy saves tons of explanation. - H.H. Munro

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 08-02-2013, 06:45 PM
  2. Sudoku 4 by 4 combination lister?
    By iskate4 in forum C++ Programming
    Replies: 2
    Last Post: 02-19-2009, 01:56 PM
  3. Functions lister
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 04-06-2003, 06:43 PM
  4. SDL project won't compile (no code yet)
    By Shadow12345 in forum Game Programming
    Replies: 7
    Last Post: 05-25-2002, 12:00 PM
  5. SDL project won't compile (no code yet)
    By Shadow12345 in forum C++ Programming
    Replies: 4
    Last Post: 05-22-2002, 01:04 PM

Tags for this Thread