Open AlbertShown opened 1 year ago
It's needed to be patched from civetweb or webui. I can not do anything for it except creating an issue on webui.
Also you can still use GCC/Clang for test it until the fix
This is not an issue. TCC does not have tlhelp32.h
. You should add it manually.
Could you copy it from your MinGW installation folder?
@malisipi Perhaps we should add a readme file inside the examples folder to show how to compile and switch to GCCC/Clang backend if needed.
Is it really needed? V documentation have the informations
[~]$ v help build-c
This command compiles the given target, along with their dependencies, into an executable.
Usage:
v [build flags] ['run'] <target.v|target_directory> [run options]
This help topic explores the C-backend specific build flags. For more general build help,
see also `v help build`.
# Interfacing the C compiler, passing options to it:
-cc <compiler>
Change the C compiler V invokes to the specified compiler.
The C compiler is required to support C99.
Officially supported/tested C compilers include:
`clang`, `gcc`, `tcc`, `mingw-w64` and `msvc`.
For V experts like you and V developers, they don't need it, but beginners in V and also those who try V for the first time need a readme file to make the experience easier and fun 😁
I added a info to readme faq 896e3a1a2a564a4df8133c7496dc99fd008018ee
v text-editor.v
tcc: error: undefined symbol 'opendir'
tcc: error: undefined symbol 'closedir'
tcc: error: undefined symbol 'IsWow64Process'
Is there a way to make V-WebUI use the prebuilt WebUI binaries instead of building it from the source? Go-WebUI uses static pre-built binaries. And Python-WebUI and Deno use dynamic pre-built binaries.
TCC support using GCC static pre-built binaries means this issue will be fixed.
It's actually good idea. I can test to create a object file by GCC and use it with TCC.
I did some tests, unfortunately without success.
Prior to the tests tlhelp32.h
was added manually to TCCs include dir. Without this step it would be possible to compile the WebUI parent library.
C:/Users/vboxuser/AppData/Local/Temp/v_0/minimal.1316904748510759959.tmp.c:501: warning: WINVER redefined
In file included from C:/Users/vboxuser/AppData/Local/Temp/v_0/minimal.1316904748510759959.tmp.c:762:
In file included from C:/Users/vboxuser/.vmodules/vwebui/webui/webui.h:56:
In file included from c:/users/vboxuser/git/v/thirdparty/tcc/include/tlhelp32.h:19:
c:/users/vboxuser/git/v/thirdparty/tcc/include/winapi/winapifamily.h:21: warning: WINAPI_FAMILY_PARTITION redefined
C:/Users/vboxuser/AppData/Local/Temp/v_0/minimal.1316904748510759959.tmp.c:6902: warning: implicit declaration of function 'tcc_backtrace'
tcc: error: undefined symbol 'strtoll'
tcc: error: undefined symbol 'SleepConditionVariableCS'
tcc: error: undefined symbol 'opendir'
tcc: error: undefined symbol 'closedir'
tcc: error: undefined symbol 'RegOpenKeyExW'
tcc: error: undefined symbol 'RegQueryValueExW'
tcc: error: undefined symbol 'RegCloseKey'
tcc: error: undefined symbol 'strtoull'
tcc: error: undefined symbol 'IsWow64Process'
Tested compiling with TCC using the GCC build files
I believe TCC is compatible with GNU GCC ABI, normally, TCC can use objects compiled using GCC.
TCC doesn't produce a dynamic lib .dll
I guess someone suggested a while ago to remove dynamic compiling part, because TCC needs tlhelp32.h
to do that.
I guess as a workaround, we can add tlhelp32.h
in the V-WebUI package, then add an include flag to make TCC find the include file... I don't know if that is possible.
If we get TCC to work, then I think it's worth it to add the tlhelp32.h
. Currently, it does not work with V when having it included.
I believe TCC is compatible with GNU GCC ABI, normally, TCC can use objects compiled using GCC.
:+1: TCC compilation works on linux when using the GCC output.
TCC compiling on Windows when using the GCC output results in an invalid object file error:
C:/Users/vboxuser/AppData/Local/Temp/v_0/minimal.8069971448029196647.tmp.c:501: warning: WINVER redefined
In file included from C:/Users/vboxuser/AppData/Local/Temp/v_0/minimal.8069971448029196647.tmp.c:762:
In file included from C:/Users/vboxuser/.vmodules/vwebui/webui/webui.h:56:
In file included from c:/users/vboxuser/git/v/thirdparty/tcc/include/tlhelp32.h:19:
c:/users/vboxuser/git/v/thirdparty/tcc/include/winapi/winapifamily.h:21: warning: WINAPI_FAMILY_PARTITION redefined
C:/Users/vboxuser/AppData/Local/Temp/v_0/minimal.8069971448029196647.tmp.c:6902: warning: implicit declaration of function 'tcc_backtrace'
tcc: error: invalid object file
tcc: error: library 'webui-2-static-x64' not found
The longer error I posted in the reply above is trying to use the TCC prebuilt.
I will look into this
I was trying to compile
text-editor.v
but I gotThis is because https://github.com/civetweb/civetweb/issues/1158