Thread: noob: compiling error... plz help!

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    2

    noob: compiling error... plz help!

    sry im a c noob and ve to ask such a lame ques..
    it would be pretty nice if u give me a reply!

    hhmm...
    i wanna compile a c file with m$ visual c++ 6.o..
    the c source requires "stdafx.h" it wasn't included in the ms librarys so i seeked in the web and found one...
    but i can't compile with this error!

    g:\vc98\include\afx.h(15) : fatal error C1189: #Fehler : MFC requires C++ compilation (use a .cpp suffix)

    it is very important...
    thanks for ya help!

    chosii
    Last edited by chosii; 05-10-2002 at 05:04 AM.

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    >"stdafx.h" it wasn't included in the ms librarys

    Sure about that? Have you tried to include this header-file?

    >MFC requires C++ compilation (use a .cpp suffix)

    Your source-file must have .cpp suffix.

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    2
    hhmm...
    the c source comes from the web.. so.. i made a new simple console apllication, and pasted the source from the web into the *.cpp file

    now there is no error with the afx.h but a new one has corrupted


    g:\cpp\msdev98\myprojects\dasda\dasda.cpp(9) : fatal error C1083: precompiled Header-File-File could not be opened: 'Debug/dasda.pch': No such file or directory

    thy for ya help shiro!

    additional:
    the *.pch file is a debug report.. isn't it?
    when i debug the source there are 27 error'S in the source... ****!
    Last edited by chosii; 05-10-2002 at 06:13 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem compiling files that store functions
    By tiachopvutru in forum C++ Programming
    Replies: 10
    Last Post: 05-30-2008, 05:42 PM
  2. Compiling Issues
    By pc_doctor in forum C Programming
    Replies: 3
    Last Post: 11-30-2007, 10:00 AM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Problem Compiling
    By Flakster in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 01:09 AM
  5. compiling and executing issue with lcc win32
    By GanglyLamb in forum C Programming
    Replies: 10
    Last Post: 12-22-2004, 02:24 PM