NO

Author Topic: How to compile C++ with Pelles?  (Read 186 times)

Offline bitcoin

  • Member
  • *
  • Posts: 62
How to compile C++ with Pelles?
« on: August 07, 2019, 12:22:37 am »
Can I compile C++ code in C? I try to add in project simple C++ file. But I have error:

Code: [Select]
Building test.obj.
*** Error: cl.exe /c /nologo /O2 /X /I"C:\Program Files\Microsoft Visual Studio\ATL\Include" /I"C:\Program Files\Microsoft Visual Studio\Include" /I"C:\Program Files\Microsoft Visual Studio\MFC\Include" "....\test.cpp" -Fo"...\test.obj"
*** Error:Cannot found file
Done.

I have Visual Studio in computer.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1850
Re: How to compile C++ with Pelles?
« Reply #1 on: August 07, 2019, 09:35:31 am »
You can't, if it is C++ code.
If C code is in .cpp file, option /TC force cl to act like a C compiler.
« Last Edit: August 07, 2019, 12:00:13 pm by TimoVJL »
May the source be with you

Offline bitcoin

  • Member
  • *
  • Posts: 62
Re: How to compile C++ with Pelles?
« Reply #2 on: August 07, 2019, 05:27:39 pm »
I see in Add-ins "C++ simple build" and think, that it can help build C++ code.
So, sorry.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1850
Re: How to compile C++ with Pelles?
« Reply #3 on: August 07, 2019, 06:31:45 pm »
Sorry.
It is possible to use a msvc compiler with poide and there are Add-ins for helping it.
But no debugging support.

1. CppFile AddIn come with PellesC and Path environment variable have to set to correct VS directory before starting poide
or Tools -> Options... -> Folders -> Executables inside poide.

2. Add VS library folder to poide LIB path.
Project -> Project options... -> Folders -> Libraries

Some of them:
https://forum.pellesc.de/index.php?topic=489.msg2145#msg2145

https://forum.pellesc.de/index.php?topic=7039.msg26707#msg26707
https://forum.pellesc.de/index.php?topic=3250.msg24126#msg24126


PellesC project to Visual Studio:
https://forum.pellesc.de/index.php?topic=7284.msg27674#msg27674

EDIT 2019-08-11:
Do we need a CppFile with additional features ?
Like CPPFLAGS in resource, so user can permanently change it ?
A user / local ini -file ?
« Last Edit: August 11, 2019, 11:05:15 am by TimoVJL »
May the source be with you