473,394 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Linking Error: C1010

105 100+
Hi all,

I am getting the error LNK:c1010...It says that stdafx.h is not in the source file...Actually I have added a new .cpp file to my project which cannot be changed at all as it is defined by somebody and so I cannot include stdafx.h file in it.

But I have included it already in my original .cpp file and have its project properties set to use precompiled header files option so that it could be used to other source files added to my project..I am not sure if I need to change any settings..

Still I am getting the same errror when I build my project..Can anyone please help me how to solve this..I am really stuck at this point..Thank you very much.

PS:

fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? d:\reconassignments\homogenity\homogenity\h.cpp

h.cpp is my new source file added to my project which I cannot change.
Feb 27 '07 #1
4 2356
mickey22
105 100+
Hi all,

Can anyone help me with my problem please???
Feb 28 '07 #2
dav3
94
Hi all,

Can anyone help me with my problem please???
Post a snippet of your code. A shot in the dark would be that #include stdafx.h is not the first #include in your program? I am almost certain I had an error in my first year classes where I had:

#include iostream
#include stdafx.h

Switching the order of these 2 solved the problem.
Mar 1 '07 #3
mickey22
105 100+
Hi Dav3,

I added stdafx.h at the beginning of my program itself before I add any directives and in stdafx.h I just added some directives like <iostream>, <string> ..But still whenever I add some other source files to my project and I build them I still get the same error that stdafx.h is not found in that particular source file.

The problem is I cannot add stdafx to newly added source files.Thats why I am not able to correct the error.Are there any other ways???

Thanks
Mar 1 '07 #4
mickey22
105 100+
Sorry, forgot to add code



Snippet of the code and filter.h is written by somebody and I have added filter.cpp to my project which does not contain stdafx.h

/////abc.cpp original source file

#include "stdafx.h"
#include "filter.h"

int main(int argc, char **argv)
{

Filter *cpar=NULL;
// initialize Filter
int iterations = 4;
int subsets = 8;

cpar=new Filter("lpf",
"2007",
"e n u is w algo oi ");
delete cpar;
cpar=NULL;

}
Mar 1 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Saurabh Aggrawal | last post by:
Hi, I am porting an application for 64-bit AMD processor and while linking the application i am getting the following errors: Processing directory uidll... Linking DLL...
0
by: SHC | last post by:
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below)...
7
by: wmkew | last post by:
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with...
3
by: Alvo von Cossel I | last post by:
hi, i am just about as new to C++ as it gets and i have a friend who gave me a C++ example. the code is fine because he can compile it but i cant. i have vc++ express my first question is: do...
4
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the...
0
by: Philip Lowman | last post by:
I am in the process of trying to migrate a couple of build solutions to Visual Studio Express 2005 from VS 2003 Professional and I am running into a weird C/C++ runtime library linking issue when...
10
by: Yahooooooooo | last post by:
Hi, learning c++, can some one check below program. its giving compiler error. #include <iostream> #include <list> using namespace std; typedef list<intListInt;
0
by: xieml2007 | last post by:
Dear Madam or Sir, I encountered one problem which is quite similiar to the discussions launched at the web site: http://www.thescripts.com/forum/thread280324.html
11
by: gumboots | last post by:
Hi there guys, I've recently purchased "Sam's Teach Yourself C++ Fifth Edition" (About a week before the 6th edition came out) I'm trying to work through the book, but in trying to compile Hello...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.