I have build one dll project .

I want to use that dll in another project.

But when I include the header file of the project I am getting an error

Error 2 fatal error C1189: #error : "include 'stdafx.h' before including this file for PCH"

Am I missing something

Kindly advice

Recommended Answers

All 2 Replies

My assumption would be you need the line #include "stdafx.h" before you call up that program. I've never used a compiler that needed it so I really can't say anything else, that's just what I think you need.

Compiler menu..Click Project->(prj name)properties..And then click Configuration Properties->C/C++->Precompiled Header..
Create/Use PH..Change it..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.