Zachary Uram
2002-12-06 20:38:04 UTC
I installed the full Dev-C++ 4.9.60 package and then used the Update
facility to upgrade to Dev-C++ 4.9.7.0. I have the Win32 build with the
Mingw compiler (g++).
My problem is that the compiler doesn't seem to be able to find all my
source files or it is building in some other directory. Here is the steps I
took for this project:
C:\Dev-Cpp is root directory where Dev-C++ is installed
I clicked File-> New-> Project.
It brought up the "New project" dialog box .
Under Basic I selected Console Application
Under Project options I selected entered graph-adj for Name and selected
C++ Project.
Then it brought up the "Create new project" dialog box.
For File name I entered "C:\Dev-cpp\graph-adj.dev".
Then it brought up the Project window. So it listed Project: graph-adj and
had a main.cpp default file in there. I removed that file and
then I clicked "Add to Project" and selected the following files to add to
my project:
graph-adj.cpp, graph-adj.h, & main.cpp
These files I had earlier copied into the directory C:\Dev-cpp.
I also copied matrix.h and graph.txt which my graph-adj program uses into
this directory.
I went to the Execute menu and selected Compile.
It compiles and I get the following 5 errors:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/DEV-CPP/include" -I"C:/DEV-CPP/include"
In file included from graph-adj.h:12,
from main.cpp:9:
matrix.h: In method `Matrix<Type>::Matrix(int, int, const Type &)':
matrix.h:76: parse error before `)'
g++.exe -c graph-adj.cpp -o graph-adj.o
-I"C:/DEV-CPP/include" -I"C:/DEV-CPP/include"
In file included from graph-adj.h:12,
from graph-adj.cpp:8:
matrix.h: In method `Matrix<Type>::Matrix(int, int, const Type &)':
matrix.h:76: parse error before `)'
g++.exe main.o graph-adj.o -o "graph-adj.exe"
-L"C:/DEV-CPP/lib" -I"C:/DEV-CPP/include" -I"C:/DEV-CPP/include"
G__~1.EXE: main.o: No such file or directory
G__~1.EXE: graph-adj.o: No such file or directory
G__~1.EXE: No input files
Execution terminated
The first error: "In file included from graph-adj.h:12," points to the
statement:
#include "matrix.h"
The second error: "In file included from main.cpp:9:" points to the statement:
#include "graph-adj.h"
Both these errors appear twice.
The fifth error "In method `Matrix<Type>::Matrix(int, int, const Type &)':"
is I believe
because for some reason the compiler cannot find the header file matrix.h
where this Matrix class
is defined.
ALso notice the compiler says it cannot find main.o, graph-adj.o or any
input files.
So what is the procedure for compiling a new project and how do I tell it
where my source files
are and where to build them?
Ideally I want the project to be in some other directory such as
C:\c++\projects\graph-adj\
BTW this same code compiled fine in Linux using g++ from command line. I
also tried adding matrix.h to my Dev-C++ Project window but I still get the
same errors.
Regards,
Zach
Zachary Uram
John 3:16
<><
facility to upgrade to Dev-C++ 4.9.7.0. I have the Win32 build with the
Mingw compiler (g++).
My problem is that the compiler doesn't seem to be able to find all my
source files or it is building in some other directory. Here is the steps I
took for this project:
C:\Dev-Cpp is root directory where Dev-C++ is installed
I clicked File-> New-> Project.
It brought up the "New project" dialog box .
Under Basic I selected Console Application
Under Project options I selected entered graph-adj for Name and selected
C++ Project.
Then it brought up the "Create new project" dialog box.
For File name I entered "C:\Dev-cpp\graph-adj.dev".
Then it brought up the Project window. So it listed Project: graph-adj and
had a main.cpp default file in there. I removed that file and
then I clicked "Add to Project" and selected the following files to add to
my project:
graph-adj.cpp, graph-adj.h, & main.cpp
These files I had earlier copied into the directory C:\Dev-cpp.
I also copied matrix.h and graph.txt which my graph-adj program uses into
this directory.
I went to the Execute menu and selected Compile.
It compiles and I get the following 5 errors:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/DEV-CPP/include" -I"C:/DEV-CPP/include"
In file included from graph-adj.h:12,
from main.cpp:9:
matrix.h: In method `Matrix<Type>::Matrix(int, int, const Type &)':
matrix.h:76: parse error before `)'
g++.exe -c graph-adj.cpp -o graph-adj.o
-I"C:/DEV-CPP/include" -I"C:/DEV-CPP/include"
In file included from graph-adj.h:12,
from graph-adj.cpp:8:
matrix.h: In method `Matrix<Type>::Matrix(int, int, const Type &)':
matrix.h:76: parse error before `)'
g++.exe main.o graph-adj.o -o "graph-adj.exe"
-L"C:/DEV-CPP/lib" -I"C:/DEV-CPP/include" -I"C:/DEV-CPP/include"
G__~1.EXE: main.o: No such file or directory
G__~1.EXE: graph-adj.o: No such file or directory
G__~1.EXE: No input files
Execution terminated
The first error: "In file included from graph-adj.h:12," points to the
statement:
#include "matrix.h"
The second error: "In file included from main.cpp:9:" points to the statement:
#include "graph-adj.h"
Both these errors appear twice.
The fifth error "In method `Matrix<Type>::Matrix(int, int, const Type &)':"
is I believe
because for some reason the compiler cannot find the header file matrix.h
where this Matrix class
is defined.
ALso notice the compiler says it cannot find main.o, graph-adj.o or any
input files.
So what is the procedure for compiling a new project and how do I tell it
where my source files
are and where to build them?
Ideally I want the project to be in some other directory such as
C:\c++\projects\graph-adj\
BTW this same code compiled fine in Linux using g++ from command line. I
also tried adding matrix.h to my Dev-C++ Project window but I still get the
same errors.
Regards,
Zach
Zachary Uram
John 3:16
<><