NO

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

Offline bitcoin

  • Member
  • *
  • Posts: 179
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: 2115
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: 179
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: 2115
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

Offline bitcoin

  • Member
  • *
  • Posts: 179
Re: How to compile C++ with Pelles?
« Reply #4 on: September 13, 2019, 03:47:47 PM »
Quote
Do we need a CppFile with additional features ?
Like CPPFLAGS in resource, so user can permanently change it ?
A user / local ini -file ?
No, I want to test some mix of C \ C++ code. I try to learn pure C++, without STL and other..only OOP (class,objects).

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: How to compile C++ with Pelles?
« Reply #5 on: September 13, 2019, 05:32:09 PM »
CppFile 2.2 have a support for CPPFLAGS, it may help in mixed C/C++ projects.
Code: [Select]
[cppflags]
cppflags=/c /nologo /O2 /X
May the source be with you