MyFbFramework - My FreeBasic Framework

User projects written in or related to FreeBASIC.
PeterHu
Posts: 159
Joined: Jul 24, 2022 4:57

Re: MyFbFramework - My FreeBasic Framework

Post by PeterHu »

Xusinboy Bekchanov wrote: Nov 21, 2023 6:56
Xusinboy Bekchanov wrote: Nov 20, 2023 12:02 It only works for me in 64-bit mode.
I couldn't find the reason for not working in 32-bit mode.
Fixed: Running WebBrowser with WebView2 in 32-bit:
https://github.com/XusinboyBekchanov/My ... 4d1dd584a7

Fixed, now it works in 32-bit too.
I rebuild the IDE and MyFbFrameWork yesterday with github downloads package(yesterday),today I noticed this post and try to run the WebBrowser example but failed with 64 bit build :

Code: Select all

10:42:07: Compilation: "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\fbc64.exe"  -b "WebBrowser Example.bas" -exx -v -s gui -i "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MariaDBBox" -p "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MariaDBBox" -i "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework" -p "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework\lib/win64" -i "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\SQLite3" -p "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\SQLite3" -i ".\Controls\MyFbFramework\inc" -p ".\Controls\MyFbFramework\Lib" -d _DebugWindow_=133356

10:42:07: FreeBASIC Compiler - Version 1.20.0 (2023-10-22), built for win64 (64bit) 
10:42:07: Copyright (C) 2004-2023 The FreeBASIC development team. 
10:42:07: standalone 
10:42:07: target :       win64, x86-64, 64bit
10:42:07: backend :      gcc
10:42:07: compiling :    WebBrowser Example.bas -o WebBrowser Example.c (main module)
10:42:11: compiling C :  E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win64\gcc.exe -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-asynchronous-unwind-tables -funwind-tables -Wno-format -masm=intel "WebBrowser Example.c" -o "WebBrowser Example.asm"
10:42:12: assembling :   E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win64\as.exe --64 --strip-local-absolute "WebBrowser Example.asm" -o "WebBrowser Example.o"
10:42:13: compiling rc :               E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win64\GoRC.exe /ni /nw /o /machine X64 /fo "WebBrowser Example.obj" "WebBrowser Example.rc"
10:42:13: linking :      E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win64\ld.exe -m i386pep -o "Release/win64/WebBrowser Example.exe" -subsystem windows -T "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win64\fbextra.x" --stack 2097152,2097152 -s -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MariaDBBox" -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework\lib/win64" -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\SQLite3" -L ".\Controls\MyFbFramework\Lib" -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win64" -L "." "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win64\crt2.o" "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win64\crtbegin.o" "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win64\fbrt0.o" "WebBrowser Example.o" "WebBrowser Example.obj" "-(" -lkernel32 -lgdi32 -lmsimg32 -luser32 -lversion -ladvapi32 -limm32 -lcomctl32 -lcomdlg32 -luuid -lole32 -loleaut32 -liphlpapi -lrasapi32 -lws2_32 -lshlwapi -lshell32 -lgdiplus -lddraw -ldxguid -luxtheme -lWebView2Loader.dll -lfbmt -lgcc -lmsvcrt -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win64\crtend.o"

10:42:13: Layout succeeded! Elapsed Time: 6.26 Seconds
10:42:13: Run: "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Examples\WebBrowser\Release\win64\WebBrowser Example.exe"  ...


Aborting due to runtime error 12 ("segmentation violation" signal) in E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework\mff\WebBrowser.bas::HANDLEISALLOCATED()



10:42:13: Application finished. Returned code: 0 - No error

Built success for 32bit but failed when running,after I entered a real website and the press the "Go" button,the app just disappeared.

Code: Select all

10:45:08: Compilation: "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\fbc32.exe"  -b "WebBrowser Example.bas" -exx -v -s gui -i "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MariaDBBox" -p "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MariaDBBox" -i "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework" -p "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework\lib/win32" -i "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\SQLite3" -p "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\SQLite3" -i ".\Controls\MyFbFramework\inc" -p ".\Controls\MyFbFramework\Lib" -d _DebugWindow_=133356

10:45:08: FreeBASIC Compiler - Version 1.20.0 (2023-10-22), built for win32 (32bit) 
10:45:08: Copyright (C) 2004-2023 The FreeBASIC development team. 
10:45:08: standalone 
10:45:08: target :       win32, 686, 32bit
10:45:08: backend :      gas
10:45:08: compiling :    WebBrowser Example.bas -o WebBrowser Example.asm (main module)
10:45:11: assembling :   E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win32\as.exe --32 --strip-local-absolute "WebBrowser Example.asm" -o "WebBrowser Example.o"
10:45:12: compiling rc :               E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win32\GoRC.exe /ni /nw /o /fo "WebBrowser Example.obj" "WebBrowser Example.rc"
10:45:12: linking :      E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\bin\win32\ld.exe -m i386pe -o "Release/win32/WebBrowser Example.exe" -subsystem windows -T "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win32\fbextra.x" --stack 1048576,1048576 -s -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MariaDBBox" -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework\lib/win32" -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\SQLite3" -L ".\Controls\MyFbFramework\Lib" -L "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win32" -L "." "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win32\crt2.o" "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win32\crtbegin.o" "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win32\fbrt0.o" "WebBrowser Example.o" "WebBrowser Example.obj" "-(" -lkernel32 -lgdi32 -lmsimg32 -luser32 -lversion -ladvapi32 -limm32 -lcomctl32 -lcomdlg32 -luuid -lole32 -loleaut32 -liphlpapi -lrasapi32 -lws2_32 -lshlwapi -lshell32 -lddraw -ldxguid -lgdiplus -luxtheme -lWebView2Loader.dll -lfbmt -lgcc -lmsvcrt -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Compilers\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\lib\win32\crtend.o"

10:45:12: Layout succeeded! Elapsed Time: 4.15 Seconds
10:45:12: Run: "E:\Learning\FreeBasic\VisualFBEditor-Nightly\Examples\WebBrowser\Release\win32\WebBrowser Example.exe"  ...


Aborting due to runtime error 7 (null pointer access) at line 57 of E:\Learning\FreeBasic\VisualFBEditor-Nightly\Controls\MyFbFramework\mff\WebBrowser.bas::NAVIGATE()



10:46:35: Application finished. Returned code: 0 - No error

Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

oyster wrote: Nov 22, 2023 1:04 it is a good news to know that webbrower2 has been supported. I am looking forward to demos on complex GUI via web technology.

Currently, I am using https://nicegui.io/. The `row/column` context layout, `slots` concept and bind_visibility make me finish a prototype very quickly. The only problem, just like most of python applications, is that the bundled release files are big. I hope MyFbFramework can replace nicegui partly in some of my small project.

Thank you for your efforts, as always
Ok, thank you too.
PeterHu wrote: Nov 22, 2023 2:49 I rebuild the IDE and MyFbFrameWork yesterday with github downloads package(yesterday),today I noticed this post and try to run the WebBrowser example but failed with 64 bit build :
The program starts here too. But the launch is interrupted when the WebView2 window is created.
PeterHu wrote: Nov 22, 2023 2:49 Built success for 32bit but failed when running,after I entered a real website and the press the "Go" button,the app just disappeared.
Fixed: WebBrowser crashes when WebView2 runtime is not installed:
https://github.com/XusinboyBekchanov/My ... 277c2b476c

You should install WebView2 runtime from this link:
https://developer.microsoft.com/en-us/m ... /#download
PeterHu
Posts: 159
Joined: Jul 24, 2022 4:57

Re: MyFbFramework - My FreeBasic Framework

Post by PeterHu »

Xusinboy Bekchanov wrote: Nov 22, 2023 4:17
oyster wrote: Nov 22, 2023 1:04 it is a good news to know that webbrower2 has been supported. I am looking forward to demos on complex GUI via web technology.

Currently, I am using https://nicegui.io/. The `row/column` context layout, `slots` concept and bind_visibility make me finish a prototype very quickly. The only problem, just like most of python applications, is that the bundled release files are big. I hope MyFbFramework can replace nicegui partly in some of my small project.

Thank you for your efforts, as always
Ok, thank you too.
PeterHu wrote: Nov 22, 2023 2:49 I rebuild the IDE and MyFbFrameWork yesterday with github downloads package(yesterday),today I noticed this post and try to run the WebBrowser example but failed with 64 bit build :
The program starts here too. But the launch is interrupted when the WebView2 window is created.
PeterHu wrote: Nov 22, 2023 2:49 Built success for 32bit but failed when running,after I entered a real website and the press the "Go" button,the app just disappeared.
Fixed: WebBrowser crashes when WebView2 runtime is not installed:
https://github.com/XusinboyBekchanov/My ... 277c2b476c

You should install WebView2 runtime from this link:
https://developer.microsoft.com/en-us/m ... /#download
From the link of M$ you provided above I have installed the WebView2 runtime:
MicrosoftEdgeWebView2RuntimeInstallerX64.exe
and also downloaded the most updated MyFbFrameWork you've just updated on github,rebuilt the IDE and try to compile the WebViewBrowser example in 64 bit again,but failed with the same issue.Have no clue why.

For 32 bit built,now it is OK.

What surprised me is when I tried to do this with a previous buit IDE,that is,the package downloaded from github is on Nov. 6th.Both 32bit and 64 bit compiled and runs pretty well.I don't know what have been changed since Nov. 6.
Please let us know which version is more stable after you fixed the issue.Thank you so much.

BTW,Building the IDE under win10 takes about minutes,is this normal?
Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

PeterHu wrote: Nov 22, 2023 4:41 From the link of M$ you provided above I have installed the WebView2 runtime:
MicrosoftEdgeWebView2RuntimeInstallerX64.exe
and also downloaded the most updated MyFbFrameWork you've just updated on github,rebuilt the IDE and try to compile the WebViewBrowser example in 64 bit again,but failed with the same issue.Have no clue why.
Then for 64 bits the error has not yet been found (But it works well on my computer).
PeterHu wrote: Nov 22, 2023 4:41 For 32 bit built,now it is OK.
Does WebView2 in 32-bit work well for you?
PeterHu wrote: Nov 22, 2023 4:41 What surprised me is when I tried to do this with a previous buit IDE,that is,the package downloaded from github is on Nov. 6th.Both 32bit and 64 bit compiled and runs pretty well.I don't know what have been changed since Nov. 6.
Previously, the example was WebBrowser with Internet Explorer. I changed the example title to "WebBrowser with IE":
https://github.com/XusinboyBekchanov/Vi ... h%20IE.bas
PeterHu wrote: Nov 22, 2023 4:41 Please let us know which version is more stable after you fixed the issue.Thank you so much.
Ok.
PeterHu wrote: Nov 22, 2023 4:41 BTW,Building the IDE under win10 takes about minutes,is this normal?
32 bit compiles quickly. 64-bit can be compiled with -gen gas64, then it compiles quickly.
PeterHu
Posts: 159
Joined: Jul 24, 2022 4:57

Re: MyFbFramework - My FreeBasic Framework

Post by PeterHu »

Then for 64 bits the error has not yet been found (But it works well on my computer).
PeterHu wrote: Nov 22, 2023 4:41 For 32 bit built,now it is OK.
Does WebView2 in 32-bit work well for you?
Do you mean downloading from M$ a fresh copy of 32 bit binary to try building 32 bit WebViewBrowser example?

PeterHu wrote: Nov 22, 2023 4:41 BTW,Building the IDE under win10 takes about minutes,is this normal?
32 bit compiles quickly. 64-bit can be compiled with -gen gas64, then it compiles quickly.
[/quote]

Sorry,here I meant building Visual FB Editor,the IDE,not WebViewBrowser example.


Just noticed the WebViewBrowser example compiles successfully with fbc 64 bit 1.1.0 .,but doesn't with fbc 1.2.0.
Last edited by PeterHu on Nov 22, 2023 5:41, edited 1 time in total.
Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

PeterHu wrote: Nov 22, 2023 5:32 Then for 64 bits the error has not yet been found (But it works well on my computer).
PeterHu wrote: Nov 22, 2023 4:41 For 32 bit built,now it is OK.
Does WebView2 in 32-bit work well for you?
Do you mean downloading from M$ a fresh copy of 32 bit binary to try building 32 bit WebViewBrowser example?
Yes, you said now it is OK.
PeterHu wrote: Nov 22, 2023 4:41 BTW,Building the IDE under win10 takes about minutes,is this normal?

32 bit compiles quickly. 64-bit can be compiled with -gen gas64, then it compiles quickly.

Sorry,here I meant building Visual FB Editor,the IDE,not WebViewBrowser example.
I'm also talking about IDE.
PeterHu
Posts: 159
Joined: Jul 24, 2022 4:57

Re: MyFbFramework - My FreeBasic Framework

Post by PeterHu »

Xusinboy Bekchanov wrote: Nov 22, 2023 5:38
PeterHu wrote: Nov 22, 2023 5:32 Then for 64 bits the error has not yet been found (But it works well on my computer).
PeterHu wrote: Nov 22, 2023 4:41 For 32 bit built,now it is OK.
Does WebView2 in 32-bit work well for you?
Do you mean downloading from M$ a fresh copy of 32 bit binary to try building 32 bit WebViewBrowser example?
Yes, you said now it is OK.
For 32 bit example,I have still only one copy from M$ downloading,that's 64 bit binary also.I choose 32 bit build from the IDE.
PeterHu wrote: Nov 22, 2023 4:41 BTW,Building the IDE under win10 takes about minutes,is this normal?

32 bit compiles quickly. 64-bit can be compiled with -gen gas64, then it compiles quickly.

Sorry,here I meant building Visual FB Editor,the IDE,not WebViewBrowser example.
I'm also talking about IDE.
I will try next time when I do an upgrade build of the IDE.

BTW,I just found the WebViewBrowser example compiles successfully with fbc 1.1.0. ,but not with fbc 1.2.0.(the MyFbFrameWork dll were built with fbc 1.2.0,I just changed to fbc 1.1.0 to compile the example and now it works)
Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

PeterHu wrote: Nov 22, 2023 5:46
Xusinboy Bekchanov wrote: Nov 22, 2023 5:38 I'm also talking about IDE.
I will try next time when I do an upgrade build of the IDE.
Ok.
PeterHu wrote: Nov 22, 2023 5:46 BTW,I just found the WebViewBrowser example compiles successfully with fbc 1.1.0. ,but not with fbc 1.2.0.(the MyFbFrameWork dll were built with fbc 1.2.0,I just changed to fbc 1.1.0 to compile the example and now it works)
I also downloaded version fbc 1.20.0. I also have problems exactly like yours.
32 bit works fine. But 64-bit cannot create a WebView2 window. In fbc 1.10.0, both 32 bit and 64 bit normally create a WebView2 window.
PeterHu
Posts: 159
Joined: Jul 24, 2022 4:57

Re: MyFbFramework - My FreeBasic Framework

Post by PeterHu »

BTW,may I ask just curious,under windows,why #define __USE_GTK3__ is defined?

Code: Select all

#ifdef __FB_WIN32__
	#ifdef __FB_64BIT__
		#cmdline "-exx ""WebBrowser Example.rc"" -x ""Release/win64/WebBrowser Example.exe"""
	#else
		#cmdline "-exx ""WebBrowser Example.rc"" -x ""Release/win32/WebBrowser Example.exe"""
	#endif
#elseif defined(__FB_ARM__)
	#cmdline "-exx ""WebBrowser Example.rc"" -x ""Release/arm64/WebBrowser Example.exe"""
#else
	#cmdline "-exx -x ""Release/linux/WebBrowser Example.exe"""
#endif
#define __USE_GTK3__
Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

PeterHu wrote: Nov 22, 2023 7:30 BTW,may I ask just curious,under windows,why #define __USE_GTK3__ is defined?

Code: Select all

#ifdef __FB_WIN32__
	#ifdef __FB_64BIT__
		#cmdline "-exx ""WebBrowser Example.rc"" -x ""Release/win64/WebBrowser Example.exe"""
	#else
		#cmdline "-exx ""WebBrowser Example.rc"" -x ""Release/win32/WebBrowser Example.exe"""
	#endif
#elseif defined(__FB_ARM__)
	#cmdline "-exx ""WebBrowser Example.rc"" -x ""Release/arm64/WebBrowser Example.exe"""
#else
	#cmdline "-exx -x ""Release/linux/WebBrowser Example.exe"""
#endif
#define __USE_GTK3__
This #define on Windows may work when compiling for GTK.
Actually, this is needed in Linux.

Code: Select all

#ifdef __USE_GTK3__
	#inclib "webkitgtk-3.0"
#else
	#inclib "webkitgtk-1.0"
#endif
If you define __USE_GTK3__ WebBrowser will use webkitgtk-3.0, otherwise webkitgtk-1.0.

WebBrowser will use the following components:
1) IE (In Windows, by default)
2) WebView2 (In Windows, if you define __USE_WEBVIEW2__)
3) webkitgtk-1.0 (In Linux, by default) - The compiled program will only use GTK2 widgets.
4) webkitgtk-3.0 (In Linux, if you define __USE_GTK3__) - The compiled program will only use GTK3 widgets.
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: MyFbFramework - My FreeBasic Framework

Post by coderJeff »

My first try compiling 64-bit vfbe.git from sources using a debug version fbc-1.20.0 I get an internal assert fail in fbc:

Code: Select all

"compiling vfbe.git 64-bit"
src\compiler\ir-hlc.bas(879): assertion failed at HMAYBEEMITGLOBALVAR: ((sym->attrib and FB_SYMBATTRIB_LOCAL) <> 0) =0
This doesn't happen with 32-bit so will need to look at this.
Xusinboy Bekchanov wrote: Nov 22, 2023 6:01 32 bit works fine. But 64-bit cannot create a WebView2 window. In fbc 1.10.0, both 32 bit and 64 bit normally create a WebView2 window.
Just to confirm: does everything seem like it compiles? But it fails at runtime?
Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

coderJeff wrote: Nov 22, 2023 10:39 My first try compiling 64-bit vfbe.git from sources using a debug version fbc-1.20.0 I get an internal assert fail in fbc:

Code: Select all

"compiling vfbe.git 64-bit"
src\compiler\ir-hlc.bas(879): assertion failed at HMAYBEEMITGLOBALVAR: ((sym->attrib and FB_SYMBATTRIB_LOCAL) <> 0) =0
This doesn't happen with 32-bit so will need to look at this.
Checks for some symbol that is not local?

I didn't compile the IDE with fbc 1.20.0. Previously I only compiled a WebBrowser Example.
I have now checked to compile the IDE with fbc 1.20.0, 32-bit and 64-bit compiled without problems.
Only -gen gas64 produced errors:

Code: Select all

15:53:35: Compilation: "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\fbc.exe"  -b "VisualFBEditor.bas" -v -x "../VisualFBEditor64.exe" -s console -gen gas64 "VisualFBEditor.rc" -i "F:\Install\Install2\VisualFBEditor\Controls\MyFbFramework" -i ".\Controls\MyFbFramework\inc" -i "D:\GitHub\fbc\inc" -p ".\Controls\MyFbFramework\Lib" -p "D:\GitHub\fbc\lib" -d _DebugWindow_=67524

15:53:35: FreeBASIC Compiler - Version 1.20.0 (2023-11-19), built for win64 (64bit) 
15:53:35: Copyright (C) 2004-2023 The FreeBASIC development team. 
15:53:35: standalone 
15:53:35: target :       win64, x86-64, 64bit
15:53:35: backend :      gas64
15:53:35: compiling :    VisualFBEditor.bas -o VisualFBEditor.asm (main module)
15:54:08: assembling :   F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\bin\win64\as.exe --64 --strip-local-absolute "VisualFBEditor.asm" -o "VisualFBEditor.o"
VisualFBEditor.asm: Assembler messages:
VisualFBEditor.asm:51619: Error: no such instruction: `report to Freebasic devs Internal Error in gas64 emitter:virtual register=3473 no real register corresponding,using KREG_XXX'
VisualFBEditor.asm:51621: Error: bad expression
VisualFBEditor.asm:51621: Error: junk `X_D' after expression
VisualFBEditor.asm:52359: Error: no such instruction: `report to Freebasic devs Internal Error in gas64 emitter:virtual register=3635 no real register corresponding,using KREG_XXX'
VisualFBEditor.asm:52361: Error: bad expression
VisualFBEditor.asm:52361: Error: junk `X_D' after expression
VisualFBEditor.asm:52859: Error: no such instruction: `report to Freebasic devs Internal Error in gas64 emitter:virtual register=3743 no real register corresponding,using KREG_XXX'
VisualFBEditor.asm:52861: Error: bad expression
VisualFBEditor.asm:52861: Error: junk `X_Q' after expression
assembling failed: 'F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\bin\win64\as.exe' terminated with exit code 1

15:54:11: Found Errors (9 Pos), Messages (2 Pos).
15:54:11: Do not build file. Elapsed Time: 36,17 Seconds
coderJeff wrote: Nov 22, 2023 10:39
Xusinboy Bekchanov wrote: Nov 22, 2023 6:01 32 bit works fine. But 64-bit cannot create a WebView2 window. In fbc 1.10.0, both 32 bit and 64 bit normally create a WebView2 window.
Just to confirm: does everything seem like it compiles? But it fails at runtime?
Yes, at runtime, in the line I specified:

Code: Select all

CreateCoreWebView2EnvironmentWithOptions(NULL, NULL, NULL, .envHandler)
https://github.com/XusinboyBekchanov/My ... r.bas#L505

Here are the compilation lines:

Code: Select all

16:03:41: Compilation: "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\fbc.exe"  -b "WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).bas" -v -v  -i "F:\Install\Install2\VisualFBEditor\Controls\MariaDBBox" -p "F:\Install\Install2\VisualFBEditor\Controls\MariaDBBox" -i "F:\Install\Install2\VisualFBEditor\Controls\MyFbFramework" -p "F:\Install\Install2\VisualFBEditor\Controls\MyFbFramework\lib/win-x64" -i "F:\Install\Install2\VisualFBEditor\Controls\ScintillaControl" -p "F:\Install\Install2\VisualFBEditor\Controls\ScintillaControl" -i "F:\Install\Install2\VisualFBEditor\Controls\SQLite3" -p "F:\Install\Install2\VisualFBEditor\Controls\SQLite3" -i ".\Controls\MyFbFramework\inc" -i "D:\GitHub\fbc\inc" -p ".\Controls\MyFbFramework\Lib" -p "D:\GitHub\fbc\lib" -d _DebugWindow_=67524

16:03:41: FreeBASIC Compiler - Version 1.20.0 (2023-11-19), built for win64 (64bit) 
16:03:41: Copyright (C) 2004-2023 The FreeBASIC development team. 
16:03:41: standalone 
16:03:41: target :       win64, x86-64, 64bit
16:03:41: backend :      gcc
16:03:41: compiling :    WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).bas -o WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).c (main module)
16:03:46: compiling C :  F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\bin\win64\gcc.exe -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -fno-ident -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-asynchronous-unwind-tables -funwind-tables -Wno-format -masm=intel "WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).c" -o "WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).asm"
16:03:47: assembling :   F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\bin\win64\as.exe --64 --strip-local-absolute "WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).asm" -o "WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).o"
16:03:48: compiling rc :               F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\bin\win64\GoRC.exe /ni /nw /o /machine X64 /fo "WebBrowser Example (with WebView2).obj" "WebBrowser Example (with WebView2).rc"
16:03:48: linking :      F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\bin\win64\ld.exe -m i386pep -o "Release/win-x64/WebBrowser Example (with WebView2).exe" -subsystem console -T "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\lib\win64\fbextra.x" --stack 2097152,2097152 -s -L "F:\Install\Install2\VisualFBEditor\Controls\MariaDBBox" -L "F:\Install\Install2\VisualFBEditor\Controls\MyFbFramework\lib/win-x64" -L "F:\Install\Install2\VisualFBEditor\Controls\ScintillaControl" -L "F:\Install\Install2\VisualFBEditor\Controls\SQLite3" -L ".\Controls\MyFbFramework\Lib" -L "D:\GitHub\fbc\lib" -L "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\lib\win64" -L "." "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\lib\win64\crt2.o" "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\lib\win64\crtbegin.o" "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\lib\win64\fbrt0.o" "WebBrowser Example (with WebView2 in Windows, WebKitGTK in Linux).o" "WebBrowser Example (with WebView2).obj" "-(" -lkernel32 -lgdi32 -lmsimg32 -luser32 -lversion -ladvapi32 -limm32 -lcomctl32 -lcomdlg32 -luuid -lole32 -loleaut32 -liphlpapi -lrasapi32 -lws2_32 -lshlwapi -lshell32 -lgdiplus -lddraw -ldxguid -luxtheme -lWebView2Loader.dll -lfbmt -lgcc -lmsvcrt -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "F:\Install\Install2\fbc_win64_mingw_0835_2023-11-19\fbc_win64_mingw\lib\win64\crtend.o"

16:03:48: Layout succeeded! Elapsed Time: 7,49 Seconds
16:03:48: Run: "F:\Install\Install2\VisualFBEditor\Examples\WebBrowser\Release\win-x64\WebBrowser Example (with WebView2).exe"  ...
16:03:48: Application finished. Returned code: 12 - Segmentation violation signal
SARG
Posts: 1768
Joined: May 27, 2005 7:15
Location: FRANCE

Re: MyFbFramework - My FreeBasic Framework

Post by SARG »

No problem here with gas64 (my own version, the very last changes after 2023/11/7 not included).
Is it from daily build version (St_W) ?

Code: Select all

D:\telechargements\temp\xusinboy\src>D:\compiler108\freebasic64bit\fbc64_gas64.exe "D:\telechargements\temp\xusinboy\src\VisualFBEditor.bas" "VisualFBEditor.rc" -gen gas64 -RR -v  -s gui -w all -maxerr  "inf"
FreeBASIC Compiler - Version 1.20.0 (2023-11-19), built for win64 (64bit)
Copyright (C) 2004-2023 The FreeBASIC development team.
standalone
target:       win64, x86-64, 64bit
backend:      gas64
compiling:    D:\telechargements\temp\xusinboy\src\VisualFBEditor.bas -o D:\telechargements\temp\xusinboy\src\VisualFBEditor.asm (main module)
assembling:   D:\compiler108\freebasic64bit\bin\win64\as.exe --64 --strip-local-absolute "D:\telechargements\temp\xusinboy\src\VisualFBEditor.asm" -o "D:\telechargements\temp\xusinboy\src\VisualFBEditor.o"
compiling rc:               D:\compiler108\freebasic64bit\bin\win64\GoRC.exe /ni /nw /o /machine X64 /fo "VisualFBEditor.obj" "VisualFBEditor.rc"
linking:      D:\compiler108\freebasic64bit\bin\win64\ld.exe -m i386pep -o "../VisualFBEditor64.exe" -subsystem windows -T "D:\compiler108\freebasic64bit\lib\win64\fbextra.x" --stack 2097152,2097152 -s -L "D:\compiler108\freebasic64bit\lib\win64" -L "." "D:\compiler108\freebasic64bit\lib\win64\crt2.o" "D:\compiler108\freebasic64bit\lib\win64\crtbegin.o" "D:\compiler108\freebasic64bit\lib\win64\fbrt0.o" "D:\telechargements\temp\xusinboy\src\VisualFBEditor.o" "VisualFBEditor.obj" "-(" -lkernel32 -lgdi32 -lmsimg32 -luser32 -lversion -ladvapi32 -limm32 -lshlwapi -luuid -lole32 -loleaut32 -lshell32 -lcomctl32 -lcomdlg32 -liphlpapi -lrasapi32 -lws2_32 -lgdiplus -lddraw -ldxguid -luxtheme -lwinspool -lwinmm -lpsapi -lfbmt -lgcc -lmsvcrt -lmingw32 -lmingwex -lmoldname -lgcc_eh "-)" "D:\compiler108\freebasic64bit\lib\win64\crtend.o"

D:\telechargements\temp\xusinboy\src>pause
Xusinboy Bekchanov
Posts: 791
Joined: Jul 26, 2018 18:28

Re: MyFbFramework - My FreeBasic Framework

Post by Xusinboy Bekchanov »

SARG wrote: Nov 22, 2023 14:05 No problem here with gas64 (my own version, the very last changes after 2023/11/7 not included).
Is it from daily build version (St_W) ?
Yes, from daily build version (St_W). I remember that I recently tested the gas64 you sent, everything was fine.
SARG
Posts: 1768
Joined: May 27, 2005 7:15
Location: FRANCE

Re: MyFbFramework - My FreeBasic Framework

Post by SARG »

Xusinboy Bekchanov wrote: Nov 22, 2023 14:16
SARG wrote: Nov 22, 2023 14:05 No problem here with gas64 (my own version, the very last changes after 2023/11/7 not included).
Is it from daily build version (St_W) ?
Yes, from daily build version (St_W). I remember that I recently tested the gas64 you sent, everything was fine.
Yes a change previously made in the compiler but for now pending, already fixes the issue with gas64.
Post Reply