Link to home
Start Free TrialLog in
Avatar of softyan
softyan

asked on

How to port c to c++(MFC)?

I created a MFC application, but now i need to reuse some function that i previously done in c. What should i do if i want to include the previous *.c files.

E.g.
I have included aaa.c and aaa.h into my MFC workspace. In the aaa.h i use extern "C" to cover the prototype of my c function in aaa.c.

When i build the exe, it returns me an error code i.e.
"Fatal Error C1010: unexpected end of file while looking for  precompiled header directive". This error message comes out when the compiler try to compile aaa.c.

I already check the help file regarding this message, unfortunately i don't understand what it try to say, and i also cann't find any solution to solve this problem.

Please help!


Avatar of softyan
softyan

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
sorry - 'precomoiled' should of course read ' precompiled' ;-)