Pelles C forum

C language => Beginner questions => Topic started by: kh_model on April 24, 2017, 08:41:42 PM

Title: compile in CPP
Post by: kh_model on April 24, 2017, 08:41:42 PM
I am new to Pelles, and I would like to know if there is any way to compile in C++. For example, is there a flag which can be set?

If anyone is interested, I am working with an existing piece of source code which appears to have originally been compiled by its author using Pelles. I base my assumption on the similar style of comments created by the WIN32 dll wizard.
Title: Re: compile in CPP
Post by: frankie on April 25, 2017, 05:07:25 PM
Hello kh_model.
Sorry to delude you, but PellesC is a C compiler, not a C++ compiler. And it will never be...

Said that the good news, your code is not C++, but C code, with some c++ alteration  >:(. Simply changing file extension from .cpp to .c, and fixing the C++ contamination, you'll be able to compile it with PellesC.  ;)
Get the attached project with the correct file.
Title: Re: compile in CPP
Post by: kh_model on April 26, 2017, 12:31:12 AM
Thank you for your kind efforts and for helping me to understand. I am deeply grateful and I wish you the best!