1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help with DLL

Discussion in 'C' started by chico1st, Aug 14, 2007.

  1. chico1st

    chico1st New Member

    Joined:
    Jun 20, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    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.
    Code:
    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
    Code:
    #include "stdafx.h"
    #include "AlazarApi.h"
    #include "AlazarCmd.h"
    #include "windows.h"
    #include "stdio.h"
    #include "conio.h"
    
    My project is set to
    Any thoughts?
    Thanks.
     
  2. chico1st

    chico1st New Member

    Joined:
    Jun 20, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    oh yeah and i added those includes to:
    startupplot.c
    stdafx.h
    stdafx.c
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    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.
     
  4. chico1st

    chico1st New Member

    Joined:
    Jun 20, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    hmm i just did create a new project and it didnt work

    Here are my project>settings
     

    Attached Files:

  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    Try generating one through the options available.
     
  6. chico1st

    chico1st New Member

    Joined:
    Jun 20, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    i have a C program so i need to include cstdio.h not stdio.h right?
     
  7. chico1st

    chico1st New Member

    Joined:
    Jun 20, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    also do i need to put all those includes into the stdafx.h file? or do i have to leave it alone?
     
  8. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    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).
     
  9. chico1st

    chico1st New Member

    Joined:
    Jun 20, 2007
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    0
    dont stdafx and precompiled header make everything run faster?

    i have it working now. should i scrap it?
     

Share This Page