Fatal Error C1010 When Building Simple Code
Bryan Richardson <[email protected]> Fri, 4 Nov 2005 16:20:58 -0700
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello All,
I'm new to using the MTL, but it seems like once I get it to work it
will be very useful with what I am doing.
Below is the code I have in "main.cpp":
#include <iostream>
#include "mtl/matrix.h"
#include "mtl/utils.h"
#include "mtl/mtl.h"
using namespace mtl;
using namespace std;
int main()
{
typedef matrix<double>::type MyMatrix;
MyMatrix A(2,2);
A(0,0) = 1.5; A(0,1) = 3.0;
A(1,0) = 3.0; A(1,1) = 1.5;
print_all_matrix(A);
return 0;
}
I am using Visual C++ 2005 Beta 2, and when I debug this I get the following:
fatal error C1010: unexpected end of file while looking for
precompiled header. Did you forget to add '#include "stdafx.h"' to
your source?
It says this occurs at line 21 of my code, but I only have 20 lines.
I'm assuming this is why it's complaining about "unexpected end of
file".
I found where all of my include files are located (such as iostream,
etc.) and placed the mtl folder in the same directory.
Can anyone tell me why this isn't working and how I can get it to work?
Thanks in advance.
_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/