NO

Author Topic: compile in CPP  (Read 2656 times)

kh_model

  • Guest
compile in CPP
« 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.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: compile in CPP
« Reply #1 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.
« Last Edit: April 25, 2017, 05:22:45 PM by frankie »
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

kh_model

  • Guest
Re: compile in CPP
« Reply #2 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!