c2v
c2v copied to clipboard
C/C++ to V translator
```pwsh myftr@nikbook_skole C:\....\src master v translate wrapper glad.c C to V translator 0.4.0 translating C:\dev\v\vopengl\vendor\src\glad.c ... C++ top level C2V command: "C:\Users\myftr\.vmodules\c2v\c2v.exe" "wrapper" "glad.c" C2V failed to...
This program should not even compile, but i tried it for fun because gcc/clang show 0 warnings with -Wall to see how c2v behaved with this code and resulted in...
``` if select( (int(tcp_socket.socket)) + 1 &fd_read &fd_write &fd_errors &tv) == -1 { status.error_state = RmtError.rmt_error_socket_select_fail return status } ``` Here's the original V code, I forgot the error, but...
``` Remotery.v:1540:20: error: unexpected token `*`, expecting name 1538 | 1539 | struct ObjectLink { 1540 | next ObjectLink_s *volatile | ^ 1541 | } ``` C code origin ->...
``` translating Remotery.c ... Remotery.v:41:2: error: struct embedding must be declared at the beginning of the struct body 39 | messageQueueSizeInBytes RmtU32 40 | maxNbMessagesPerUpdate RmtU32 41 | C.malloc RmtMallocPtr...
``` Remotery.v:838:1: error: a type alias can not refer to itself: Dl_info 836 | 837 | fn munmap( voidptr, usize) int 838 | type Dl_info = Dl_info | ~~~~~~~~~~~~~~~~~~~~~~ 839...
I tried following the demo, and copied the `primes.c` file to a file called `main.c` which has the following code: ```c #include #include _Bool is_prime(int num) { for (int i...
Also Test files for ci should be maintained in this project and not in doom project(https://github.com/vlang/doom/blob/master/build_whole_project.sh)
Small xml library xml.c cant be converted to v code. Repo of C code - https://github.com/ooxi/xml.c ``` bash git clone https://github.com/ooxi/xml.c.git # commit 2cb2dcaf2b4d6ff42346e8c58eefd28559666747 (HEAD -> master, origin/master, origin/HEAD) cd...
Tried convert paho without success https://github.com/eclipse/paho.mqtt.c ``` bash $ v run $HOME/.vmodules/c2v -d trace_verbose paho.mqtt.c/src C to V translator 0.3.1 "paho.mqtt.c/src" is a directory, processing all C files in it...