Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How to overcome this ERROR (http://www.go4expert.com/forums/overcome-error-t2332/)

Tango Issac Debian 23Dec2006 22:02

How to overcome this ERROR
 
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

DaWei 23Dec2006 22:54

Re: How to overcome this ERROR
 
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.

Tango Issac Debian 23Dec2006 23:48

Re: How to overcome this ERROR
 
Hallo,
Dawei, Please explain more....I am new in the working with the .dll projects with VC++6.0.
Thanks
Tango

shabbir 24Dec2006 00:01

Re: How to overcome this ERROR
 
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.

shabbir 24Dec2006 13:21

Re: How to overcome this ERROR
 
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.


All times are GMT +5.5. The time now is 01:41.