Pelles C forum

Pelles C => Add-ins => Topic started by: TimoVJL on August 11, 2019, 12:42:58 PM

Title: CppFile Add-In, a modified version
Post by: TimoVJL on August 11, 2019, 12:42:58 PM
CppFile Add-In, a modified version for case https://forum.pellesc.de/index.php?topic=8127.msg29704#msg29704
 default CPPCLAGS in resource.
 a user or local ini-file.

After adding it, User can change defaults from menu Tools -> Options... -> Add-ins -> C++ syntax color highlighting (and simple build support 2.1) by pressing Options.. button.

EDIT
CppFile2_WS_2.2.zip, support for lib settings.
An example:
Code: [Select]
[cppflags]
cppflags=/c /nologo /O2 /X
[include]
include0=/I"C:\code\msvc2013\include"
[lib]
lib0="C:\code\msvc2013\lib"
lib1="C:\code\WinSDK\v7.1A\Lib"
[lib64]
lib0="C:\code\msvc2013\lib\x64"
lib1="C:\code\WinSDK\v7.1A\Lib\x64"
Title: Re: CppFile Add-In, a modified version
Post by: bitcoin on August 20, 2019, 11:21:40 PM
Thank you, but this button is inactive
(https://i.imgur.com/k0tzk8H.png)
(https://i.imgur.com/akIEAEK.png)
And I have error 'fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory'

But I added folders from Visual Studio (lib, bin, inc) and even DDK. No result.
Title: Re: CppFile Add-In, a modified version
Post by: TimoVJL on August 20, 2019, 11:55:19 PM
Unselect cppfile and select that CppFile 2.1 and try again, but poide need to restart.
Title: Re: CppFile Add-In, a modified version
Post by: bitcoin on August 21, 2019, 12:00:52 AM
Ok, but I again have error "fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory"

I put in Ini file path for my studio..
[include]
include0=/I"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\atlmfc\include"
include1=/I"c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include"
include2=/I"C:\Program Files\Microsoft Visual Studio\MFC\Include"
Title: Re: CppFile Add-In, a modified version
Post by: TimoVJL on August 21, 2019, 12:23:01 AM
ucrt folder ???

Use project option verbose to check correct commandline.

Also with Tools -> Options... -> Add-ins -> C++ syntax color highlighting (and simple build support 2.1) by pressing Options.. button.
Output window show full commandline.
Title: Re: CppFile Add-In, a modified version
Post by: bitcoin on August 21, 2019, 11:27:25 AM
I added includes from VC98 , and create new project.. So, I have new error

> polink.exe -machine:x86 -subsystem:console -safeseh kernel32.lib advapi32.lib delayimp.lib -out:"D:\oop1.exe" D:\output\oop1.obj
POLINK: warning: Section '.gfids$y' is not supported; ignored.
POLINK: fatal error: File not found: 'libucrt.lib'.

So, I delete #include <stdio.h> and add option NODEFAULTLIB (ignore standart places) , and it work! Thank!

But why can not I use the CRT? Is this normal for C++ or am I having an error?
Title: Re: CppFile Add-In, a modified version
Post by: TimoVJL on August 21, 2019, 11:42:45 AM
It's just a M$ header/lib hell.
Code: [Select]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt
Code: [Select]
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x86
Code: [Select]
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10240.0\ucrt\x64I rather use a WinDDK 7.10 files, as it have a support for msvcrt.dll

Windows is not a Microsoft Visual C/C++ Run-Time delivery channel (https://devblogs.microsoft.com/oldnewthing/?p=1273)
Title: Re: CppFile Add-In, a modified version
Post by: bitcoin on August 21, 2019, 12:30:57 PM
Quote
I rather use a WinDDK 7.10 files, as it have a support for msvcrt.dll
if I add WinDDK includes, i have error with LIBCMT.lib
Okay, I probably have path errors. The main thing is that clean  ะก++ code compiles well. thank!
Title: Re: CppFile Add-In, a modified version
Post by: TimoVJL on August 21, 2019, 12:44:57 PM
Just add correct WinDDK lib-folder to project lib-folders. Project -> Project options... -> Folders -> Libraries