Miracle C compiler Linker Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stephon Woodland
    New Member
    • Jul 2007
    • 2

    #1

    Miracle C compiler Linker Error

    Hello everyone/anyone,

    I am a stutdent with UoP online. I just learning the IT world and the class I am taking right now is "Programmin g Concepts" using the C programming language. I have just wrote a program for a Tax Calclation, compiled it and now I am having issues with executing it because there is a "linking error" that says "Linker Error (Severity 8)
    Destination string too small (256 bytes) to hold:
    "c:\documen ts and settings\stepho n woodland jr\desktop\uop\ tax calculator\tax calculator in c_change1_ver3. obj,,c:\documen ts and settings\stepho n woodland jr\desktop\uop\ tax calculator\tax calculator in c_change1_ver3. map,c:\Program Files\Miracle C\ccl.lib ;" (257 bytes)"

    Does anyone know what this means? If so, I would appreciate a hand so that I can fix this and turn in my assignment. Thank you a lot.

    Stephon
  • rag84dec
    New Member
    • Mar 2007
    • 100

    #2
    please post the code...It is very difficult to understand your problem...

    Comment

    • Stephon Woodland
      New Member
      • Jul 2007
      • 2

      #3
      Sorry for that. Here is my code:
      Code:
      /*This is Tax Caluator program for Kudler Fine Foods.  Based off of the Service Request hat was recieved from the organization, a program was needed that displays
      the sales tax amount for each store location for a purchase amount of $125.00 or greater.*/
      
      /*On June 20, 2007, the Kudler Fine Foods organization requested a change in the program.  It was to modify the C program so that the user inputs the purchase amount.
      Check the user's input for validity. In addition to calculating the sales tax for each location, calculate and display the total sale amount for each location.*/
      
      /*On July 2, 2007, Kuddler Fine Foods made another change request to have the user select from a menu which store to use for the tax calculation.
      Calculate and display the tax amount for the store selected and the total sale amount for that store.*/
      
      //Tax Calculator
      // by Stephon Woodland Jr.
      // Version 4 with changes made on July 1, 2007
      
      #include <stdio.h>
      #include <ctype.h>
      main(void)
      {
         //variable declarations
         float DelMarRate;
         float EncinitasRate; 
         float LaJollaRate;
         float Price;
         float SalesTax;
         float TotalSaleAmount;
         
         //variable initialization
         DelMarRate = 0.0725; 
         EncinitasRate = 0.075; 
         LaJollaRate = 0.0775;
         Price >= 125.00;
         SalesTax = Price * DelMarRate, EncinitasRate, LaJollaRate;
         TotalSaleAmount = (Price * DelMarRate, EncinitasRate, LaJollaRate) + Price;
         
         //Program Header
         printf("\n/tKudler Fine Foods Tax Calculator\n"); 
      
         //printing variable contents to standard output
         printf("\nThe value of DelMarRate is %f", DelMarRate);
         printf("\nThe value of EncinitasRate is %f", EncinitasRate);
         printf("\nThe value of LaJollaRate is %f", LaJollaRate);
         
         //printing sales tax
         printf("\nEnter Price: ");
         scanf("%f", &Price);
            if (Price <=125.00)//checking for validity of price entry
            {
               printf("\nThank you for shopping at Kuddler Fine Foods\n");
            }
            else
            {
               printf("Enter DelMarRate or EncinitasRate or LaJollaRate: ");//enter the sales tax rate of any store location
            }
         scanf("%f", &DelMarRate, &EncinitasRate, &LaJollaRate);//entering the sales tax rate
            if (DelMarRate != 0.0725, EncinitasRate !=0.075, LaJollaRate != 0.0775)
            {
               printf("\nInvalid Input\n");//checking for validity
            }
            else
            {
               SalesTax = Price * DelMarRate, EncinitasRate, LaJollaRate;//Multiply Price by tax rate
               printf("\nThe SalesTax is %f\n", Price * DelMarRate, EncinitasRate, LaJollaRate);//The sales tax amount is displayed
               printf("\nThe TotalSaleAmount is %.2f\n", (Price * DelMarRate, EncinitasRate, LaJollaRate) + Price);//The Total Sale Amount
            }
         return 0;
      }
      /*The input validations have been implemented for the change request by the client organization.  Input validity was for the price entry and the sales tax rate entry.*/

      Comment

      • scruggsy
        New Member
        • Mar 2007
        • 147

        #4
        It's nothing to do with your code. Your compiler has a problem with the length of this file path:
        Originally posted by Stephon Woodland
        "c:\documen ts and settings\stepho n woodland jr\desktop\uop\ tax calculator\tax calculator in c_change1_ver3. obj,,c:\documen ts and settings\stepho n woodland jr\desktop\uop\ tax calculator\tax calculator in c_change1_ver3. map,c:\Program Files\Miracle C\ccl.lib ;"
        According to the error message it's only one character too long. Try renaming one of your files to shorten the name, or moving the project into a different directory with a shorter path, or checking if there's some setting in your compiler to fix it.

        Since you posted your code, though, you might want to check your use of the comma operator in lines like:
        Code:
        if (DelMarRate != 0.0725, EncinitasRate !=0.075, LaJollaRate != 0.0775)
        
        SalesTax = Price * DelMarRate, EncinitasRate, LaJollaRate;//Multiply Price by tax rate

        Comment

        Working...