Can I compile C++ code in C? I try to add in project simple C++ file. But I have error:
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.
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.
I see in Add-ins "C++ simple build" and think, that it can help build C++ code.
So, sorry.
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 ?
QuoteDo 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).
CppFile 2.2 have a support for CPPFLAGS, it may help in mixed C/C++ projects.
[cppflags]
cppflags=/c /nologo /O2 /X