How to overcome this ERROR

Tango Issac Debian's Avatar, Join Date: May 2006
Go4Expert Member
hallo
guys please help me how to overcome this problem...

When i doing to create a .dll project on VC++6.0.......thehe my code structure was that..,,,,, ERROR MESSAGE during compile time is:::fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.

program1::::::The ADLL.cpp
Code:
// Adll.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "Header.h"

int addINT(int a,int b){ 
   return add(a,b);
}
BOOL APIENTRY DllMain( HANDLE hModule,  DWORD  ul_reason_for_call,   LPVOID pReserved )
{    return TRUE;
}
2)Program ADD.h:::::::::::::::
Code:
#ifndef __HEADER_H__
#define  __HEADER_H__
#ifdef __cplusplus
extern "C" {
#endif
int add(int ,int);
#endif 
#ifdef __cplusplus}
#endif

3)Program 3))) ADD.c
#include "Header.h"

int add(int a,int b){

  return a+b;
}<------------------The ERROR position
The error occured in the LAst file ADD.c


pls say me what i doing the wrong ....how i will overcome it????
Thanks
Tango

Last edited by shabbir; 24Dec2006 at 00:00.. Reason: Code formating.
0
DaWei's Avatar, Join Date: Dec 2006
Team Leader
Turn off precompiled headers. Re-read the link, "Before you make a query". You seemed to have missed some stuff, as in using code tags.
0
Tango Issac Debian's Avatar, Join Date: May 2006
Go4Expert Member
Hallo,
Dawei, Please explain more....I am new in the working with the .dll projects with VC++6.0.
Thanks
Tango
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by DaWei
Turn off precompiled headers. Re-read the link, "Before you make a query". You seemed to have missed some stuff, as in using code tags.
I have added the code tags for the code block.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Try replacing the line
#ifdef __cplusplus}
with
#ifdef __cplusplus
}

You are giving an opening { when __cplusplus but not the closing one } for the same I guess.