-
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.
-
find the file the error is occurring in, and show us all the files/libraries/outside code you included in it.
-
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.