NO

Author Topic: problems with afxres.h. cannot add the file  (Read 3936 times)

mark

  • Guest
problems with afxres.h. cannot add the file
« on: November 03, 2009, 04:02:04 PM »
Hi everyone:

I am new to the Forum and new to Pelles C, so I'm a bit uneasy asking this question...I have searched the forum for earlier posts and can't identify anything that exists already.

I am trying to build a project originally written by Petzold.  It is a Windows gui application.  The code has an include file named afxres.h.  When I try to add this file to the build I get a message that reads:
 
"unable to add the file afxres.h to the project: The target file cannot be determined from the source file's extension."

On my system afxres.h is located deep inside Windows SDK Platform.  I'm running Windows XP on an HP box with a Intel core duo processor. 

I am completely at a dead end unless you folks have a suggestion.  I'm guessing that the problem probably stems from my unfamiliarity with Pelles IDE.

Regards,

Mark

JohnF

  • Guest
Re: problems with afxres.h. cannot add the file
« Reply #1 on: November 03, 2009, 05:28:22 PM »
At the top of afxres.h is says

// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1998 Microsoft Corporation
// All rights reserved.

Which means it can only be used from within the C++ environment, PellesC is a C only compiler.

The best way to continue is take out any reference to afxres.h and try to sort out any errors that may come up.

John


« Last Edit: November 03, 2009, 05:46:17 PM by JohnF »

mark

  • Guest
Re: problems with afxres.h. cannot add the file
« Reply #2 on: November 03, 2009, 05:54:09 PM »
Hi John-

Yup, you're right.  Thanks.

I guess no other work-around than what you're suggesting?

Mark