Thread: fatal error LNK1104

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    12

    fatal error LNK1104

    Hello. I have a solution with three projects in it. Most of the files are .c's, but a few are .cpp's, so I figured this should go here. Anyway, when I try to build the solution I get this error:

    1>LINK : fatal error LNK1104: cannot open file 'msvcirtd.lib'

    Since this is a linking error, I have no idea which part of my code I would need to paste here, if anything. It's just a simple console application, so I find it curious that such a problem could occur.

    Thanks.

  2. #2
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    find the file the error is occurring in, and show us all the files/libraries/outside code you included in it.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  3. #3
    Registered User
    Join Date
    Oct 2005
    Posts
    12
    The file with the error is main.c.

    Code:
    #include <stdio.h>
    #include <string.h>
    #include "parser.h"
    parser.h...

    Code:
    #ifndef PARSER_H
    #define PARSER_H
    
    void parse(char *s);
    
    #endif
    parse() is in parser.cpp, which includes...

    Code:
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    #include <stdlib.h>
    #include "parser.h"
    #include "..\dialogue\personalities.h"
    #include "..\room\apstring.h"
    #include "..\room\structs.h"
    And, lastly, apstring.h (where I think the problem must be coming from).

    Code:
    #ifndef _APSTRING_H
    #define _APSTRING_H
    
    #include <iostream.h>
    // uncomment line below if bool not built-in type
    // #include "bool.h"
    
    // *******************************************************************
    //  Last Revised: January 13,1998
    //
    //  APCS string class
    //
    //  string class consistent with a subset of the standard C++ string class
    //  as defined in the draft ANSI standard
    // *******************************************************************
    
    extern const int npos;  // used to indicate not a position in the string
    
    class apstring
    {
      public:
    
      // constructors/destructor
    
        apstring( );                         // construct empty string ""
        apstring( const char * s );          // construct from string literal
        apstring( const apstring & str );      // copy constructor
        ~apstring( );                        // destructor
    
      // assignment
    
        const apstring & operator = ( const apstring & str ); // assign str
        const apstring & operator = ( const char * s );       // assign s
        const apstring & operator = ( char ch );              // assign ch
    
      // accessors
    
        int    length( )                  const;    // number of chars
        int    find( const apstring & str ) const;  // index of first occurrence of str
        int    find( char ch )            const;    // index of first occurrence of ch
        apstring substr( int pos, int len ) const;    // substring of len chars
                                                    // starting at pos
        const char * c_str( )             const;    // explicit conversion to char *
    
      // indexing
    
        char   operator[ ]( int k )       const;    // range-checked indexing
        char & operator[ ]( int k );                // range-checked indexing
    
      // modifiers
    
        const apstring & operator += ( const apstring & str );// append str
        const apstring & operator += ( char ch );            // append char
    
    
      private:
          int myLength;                     // length of string (# of characters)
          int myCapacity;                   // capacity of string
          char * myCstring;                 // storage for characters
    };
    
    // The following free (non-member) functions operate on strings
    //
    // I/O functions
    
    ostream & operator << ( ostream & os, const apstring & str );
    istream & operator >> ( istream & is, apstring & str );
    istream & getline( istream & is, apstring & str );
    
    // comparison operators:
    
    bool operator == ( const apstring & lhs, const apstring & rhs );
    bool operator != ( const apstring & lhs, const apstring & rhs );
    bool operator <  ( const apstring & lhs, const apstring & rhs );
    bool operator <= ( const apstring & lhs, const apstring & rhs );
    bool operator >  ( const apstring & lhs, const apstring & rhs );
    bool operator >= ( const apstring & lhs, const apstring & rhs );
    
    // concatenation operator +
    
    apstring operator + ( const apstring & lhs, const apstring & rhs );
    apstring operator + ( char ch, const apstring & str );
    apstring operator + ( const apstring & str, char ch );
    
    #endif
    Thanks.
    Last edited by DMH; 11-16-2005 at 03:50 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fatal error in fprintf
    By shoobsie in forum C Programming
    Replies: 4
    Last Post: 10-14-2005, 05:56 AM
  2. Fatal errors
    By cheeisme123 in forum C++ Programming
    Replies: 2
    Last Post: 02-06-2003, 10:03 PM
  3. Weird fatal error, header file related
    By alkis_y3k in forum C++ Programming
    Replies: 2
    Last Post: 12-26-2002, 09:54 AM
  4. fatal exception 0E
    By juhigarg in forum Windows Programming
    Replies: 3
    Last Post: 12-04-2001, 04:40 AM
  5. Fatal error :/
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-13-2001, 08:53 PM