Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Help with DLL (http://www.go4expert.com/forums/help-with-dll-t5861/)

chico1st 14Aug2007 20:08

Help with DLL
I am trying to make a dll in Microsoft VC++ 6 2005

It is a C program

but im getting this error. I dont really understand precompiled headers so i dont know what to do.

c:\startupplot\startupplot.c(4) : fatal error C1853: 'Debug/StartUpPlot.pch'
is not a precompiled header file created with this compiler

these are my includes

#include "stdafx.h"
#include "AlazarApi.h"
#include "AlazarCmd.h"
#include "windows.h"
#include "stdio.h"
#include "conio.h"

My project is set to

Use precomiled header:
through : stdafx.h
Any thoughts?

chico1st 14Aug2007 20:11

Re: Help with DLL
oh yeah and i added those includes to:

shabbir 14Aug2007 20:49

Re: Help with DLL
This pre-compiled headers always have bug me and the solution I use is simple create a new project and get all the .cpp .h and .rc files into the new one.

The other solution is to have the pre-compiled headers set in the options.

chico1st 14Aug2007 20:59

Re: Help with DLL
1 Attachment(s)
hmm i just did create a new project and it didnt work

Here are my project>settings

shabbir 14Aug2007 21:05

Re: Help with DLL
Try generating one through the options available.

chico1st 14Aug2007 22:54

Re: Help with DLL
i have a C program so i need to include cstdio.h not stdio.h right?

chico1st 14Aug2007 22:54

Re: Help with DLL
also do i need to put all those includes into the stdafx.h file? or do i have to leave it alone?

DaWei 15Aug2007 03:18

Re: Help with DLL
Dump the stdafx file(s). Turn off precompiled headers. The C header for stdio is stdio.h. The C++ header for stdio is cstdio (no .h).

chico1st 15Aug2007 08:56

Re: Help with DLL
dont stdafx and precompiled header make everything run faster?

i have it working now. should i scrap it?

All times are GMT +5.5. The time now is 17:33.