Click here to Skip to main content
15,883,928 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: visual studio 2010 error help needed Pin
Richard MacCutchan8-Jul-15 3:26
mveRichard MacCutchan8-Jul-15 3:26 
GeneralMessage Closed Pin
29-Sep-15 3:45
HighClassAsianEscort29-Sep-15 3:45 
QuestionMFC multi languages UI question Pin
econy26-Jun-15 3:34
econy26-Jun-15 3:34 
AnswerRe: MFC multi languages UI question Pin
Albert Holguin26-Jun-15 10:55
professionalAlbert Holguin26-Jun-15 10:55 
Questionuser32!IsWindow crash Pin
yu-jian2-Jun-15 0:42
yu-jian2-Jun-15 0:42 
AnswerRe: user32!IsWindow crash Pin
Richard MacCutchan2-Jun-15 5:13
mveRichard MacCutchan2-Jun-15 5:13 
AnswerRe: user32!IsWindow crash Pin
Bernhard Hiller3-Jun-15 3:14
Bernhard Hiller3-Jun-15 3:14 
QuestionVS skips $include "stdafx.h" Pin
bkelly131-Jun-15 9:38
bkelly131-Jun-15 9:38 
Windows XP, Visual Studio 2008, MFC, Cpp
Note: I am hoping that someone recognizes this basic class of problems and can advise me without additional details. If needed, tell me what additional details are required.
I cannot copy/paste from my working computer so please excuse any obvious typos.

Basic Problem:
I added a simple stand alone function to my project and cannot get Visual Studio to compile it.

Setup:
Application AR2_IADS_Client_Simlulator is located in E:\VISUAL_STUDIO\AR2_IADS_Client_Simulator.
This directory: E:\VISUAL_STUDIO\COMMON_CODE contains classes and code that is used by multiple solutions and projects.
In the Solution Explorer, project AR2_IADS_Client_Simulator I right clicked on the Header Files part of the project and added a new dot h file named: Log_One_TCP_Packet.h. It was placed in the COMMON_CODE directory. It looks like this:

#include "stdafx.h"
#include "C_Log_Writer.h"
Void Log_One_TCP_Packet( … arguments );


The same was done in section Source Files and file Log_One_TCP_Packet.h.cpp was also created in COMMON_CODE. It begins like this:

#include "stdafx.h"
#include "Log_One_TCP_Packet.h"
Void Log_One_TCP_Packet( … arguments )
{ … }


Action:
The cpp file is open in VS and is in focus. Press ctl-F7 to compile it.
The error messages state:

Quote:
Warning C4627 #include “stdafx.h” skipped when looking for precompiled header use.
Warning C4627 #include “Log_One_TCP_Packet.h” skipped when looking for precompiled header use.
Fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add ‘#include “stdafx.h”’ to your soruce?



I don’t know of any option such as: #include_and_do_not_skip “Log_One_TCP_Packet.h”
There is no button I can select that says: “No! I did not forget. Its right there in the source code.”
There are already several classes in COMMON_CODE used by this project. The directory is referenced in

Quote:
Properties -> Configuration Properties -> C/C++ -> Additional Include Directories.


Questions
Must this function be made into a stand-alone class just for this one function?
How might I get VS to recognize and compile it?
Thank you for your time
If you work with telemetry, please check this bulletin board: www.irigbb.com


AnswerRe: VS skips $include "stdafx.h" Pin
Richard Andrew x641-Jun-15 12:55
professionalRichard Andrew x641-Jun-15 12:55 
GeneralRe: VS skips $include "stdafx.h" Pin
bkelly131-Jun-15 13:17
bkelly131-Jun-15 13:17 
AnswerRe: VS skips $include "stdafx.h" Pin
peterchen12-Aug-15 12:52
peterchen12-Aug-15 12:52 
QuestionC++ 11 std::unique_ptr related compiling error Pin
Falconapollo28-May-15 17:27
Falconapollo28-May-15 17:27 
QuestionRe: C++ 11 std::unique_ptr related compiling error Pin
yufengzjj2-Jun-15 4:19
yufengzjj2-Jun-15 4:19 
AnswerRe: C++ 11 std::unique_ptr related compiling error Pin
Theo Buys8-Jul-15 1:34
Theo Buys8-Jul-15 1:34 
AnswerRe: C++ 11 std::unique_ptr related compiling error Pin
vickoza10-Jul-15 6:23
vickoza10-Jul-15 6:23 
QuestionCListBox with wchar or WCHAR, Resolved Pin
bkelly1327-May-15 8:09
bkelly1327-May-15 8:09 
AnswerRe: CListBox with wchar or WCHAR Pin
emadns27-May-15 9:39
emadns27-May-15 9:39 
AnswerRe: CListBox with wchar or WCHAR Pin
Richard MacCutchan27-May-15 21:10
mveRichard MacCutchan27-May-15 21:10 
GeneralRe: CListBox with wchar or WCHAR Pin
bkelly1328-May-15 3:40
bkelly1328-May-15 3:40 
GeneralRe: CListBox with wchar or WCHAR Pin
Richard MacCutchan28-May-15 3:55
mveRichard MacCutchan28-May-15 3:55 
GeneralRe: CListBox with wchar or WCHAR, Problem discovered Pin
bkelly1329-May-15 3:57
bkelly1329-May-15 3:57 
GeneralRe: CListBox with wchar or WCHAR, Problem discovered Pin
Richard MacCutchan29-May-15 4:33
mveRichard MacCutchan29-May-15 4:33 
Questionis it true? fells he is boast, please somebody help me test . Pin
1971 powerChina7-May-15 15:19
1971 powerChina7-May-15 15:19 
QuestionRe: is it true? fells he is boast, please somebody help me test . Pin
ZurdoDev18-May-15 4:54
professionalZurdoDev18-May-15 4:54 
QuestionServer execution failed in MFC COM Pin
Hydera29-Apr-15 23:59
Hydera29-Apr-15 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.