This is more or less a reply to this post:https://www.oxygenbasic.org/forum/index.php?topic=1946.0;topicseen
with added stuff. I don't want to polute that topic.
Mike,
I no longer use LinkRes2Exe as OxygenBasic was the only compiler that I use that needed it. With Charles last update I can retire it. I agree with the icon/version/manifest. I had heard of the version/manifest but not with the icon. I will start adding that also. This is the manifest I use for all coding. Most (if not all) is from José and his FreeBasic AFX Framework.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="amd64"
name="ApplicationName"
type="win32"/>
<description>Optional description of your application</description>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
<!-- Compatibility section -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!--This Id value indicates the application supports Windows 8 functionality-->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!--This Id value indicates the application supports Windows 8.1 functionality-->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- This Id value indicates the application supports Windows 10 functionality-->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
<!-- Trustinfo section -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="asInvoker"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*" />
</dependentAssembly>
</dependency>
</assembly>
On the bc9Basic side I am c++ only with VS2019. I do test apps on occasion with the NUWEN distro.
I found my first gotcha with TCLib/msvcrt.dll though which also will affect OxygenBasic unless Charles has found a way to use ucrtbase.dll
I received an email pointing out a problem with the time functions which I verified.
Output using vs2019 on Win 10 and gcc on Linux:
Mon Aug 5 14:52:11 2019
Today is Monday, August 05.
The time is 02:52 PM.
ISO week day is 2019W321.
Output from NUWEN and my bc9/TCLib:
Mon Aug 05 15:18:27 2019
Today is Monday, August 05.
The time is 03:18 PM.
"c" source
#include <time.h>
#include <stdio.h>
#define SIZE 256
int main (void)
{
char buffer[SIZE];
time_t curtime;
struct tm *loctime;
/* Get the current time. */
curtime = time (NULL);
/* Convert it to local time representation. */
loctime = localtime (&curtime);
/* Print out the date and time in the standard format. */
fputs (asctime (loctime), stdout);
/* Print it out in a nice format. */
strftime (buffer, SIZE, "Today is %A, %B %d.\n", loctime);
fputs (buffer, stdout);
strftime (buffer, SIZE, "The time is %I:%M %p.\n", loctime);
fputs (buffer, stdout);
strftime (buffer, SIZE, "ISO week day is %GW%V%u.\n", loctime);
fputs (buffer, stdout);
return 0;
}
Reply from Stephan T. Lavavej (NUWEN)
This is almost certainly caused by MinGW's use of msvcrt.dll in Windows, which is an old version of the CRT. VS 2017+ uses ucrtbase.dll, the modern Universal CRT with C99 support.
I would be interested if anyone knows how to use ucrtbase.dll. I did search a bit but no luck with actual code.
James