Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C2V not working in windows in cJSON project #188

Open
jechaviz opened this issue Dec 20, 2024 · 4 comments
Open

C2V not working in windows in cJSON project #188

jechaviz opened this issue Dec 20, 2024 · 4 comments
Labels
Bug Something isn't working

Comments

@jechaviz
Copy link

jechaviz commented Dec 20, 2024

.

@jechaviz
Copy link
Author

jechaviz commented Dec 20, 2024

C:\git\ethers.objc\ethers\src\Providers\ApiProviders>v translate ApiProvider.h
C2V is not installed. Cloning C2V to C:\Users\jesus\.vmodules\c2v ...
Compiling c2v ...
================ V panic ================
   module: main
 function: find_clang_in_path()
  message: cannot find clang in PATH
     file: ./src/c2v.v:128
   v hash: 903e349
=========================================
C:/Users/jesus/AppData/Local/Temp/v_0/../../../../../..C:\Users\jesus\scoop\apps\v\0.4.8\vlib\builtin\builtin.c.v:87: at panic_debug: Backtrace
C:/Users/jesus/AppData/Local/Temp/v_0/../../../../../..C:\Users\jesus\.vmodules\c2v\src\c2v.v:128: by main__find_clang_in_path
C:/Users/jesus/AppData/Local/Temp/v_0/../../../../../..C:\Users\jesus\AppData\Local\Temp\v_0\c2v.exe.tmp.c:43449: by _vinit
C:/Users/jesus/AppData/Local/Temp/v_0/../../../../../..C:\Users\jesus\AppData\Local\Temp\v_0\c2v.exe.tmp.c:43463: by wmain
00528360 : by ???
005284c3 : by ???
7ffb4ee27374 : by ???
C2V command: "C:\Users\jesus\.vmodules\c2v\c2v.exe" "ApiProvider.h"
C2V failed to translate the C files. Please report it via GitHub.

C:\git\ethers.objc\ethers\src\Providers\ApiProviders>
```

@jechaviz
Copy link
Author

I did this also:

C:\Users\jesus\.vmodules\c2v\src>v c2v_test.v
V panic: cannot find clang in PATH
v hash: 2ab1523
C:/Users/jesus/AppData/Local/Temp/v_0/c2v_test.01JFJ2EWS4QC0P7TEJ9TR636V0.tmp.c:12618: at _v_panic: Backtrace
C:/Users/jesus/AppData/Local/Temp/v_0/c2v_test.01JFJ2EWS4QC0P7TEJ9TR636V0.tmp.c:33928: by main__find_clang_in_path
C:/Users/jesus/AppData/Local/Temp/v_0/c2v_test.01JFJ2EWS4QC0P7TEJ9TR636V0.tmp.c:38295: by _vinit
C:/Users/jesus/AppData/Local/Temp/v_0/c2v_test.01JFJ2EWS4QC0P7TEJ9TR636V0.tmp.c:38309: by wmain
0073cbb8 : by ???
0073cd1b : by ???
7ffb4ee27374 : by ???

@JalonSolov
Copy link
Contributor

One of c2v's dependencies is the clang front-end. You can get gcc+clang from https://winlibs.com, then add the directory you extract to to your path. Then c2v will be able to find it.

@JalonSolov
Copy link
Contributor

However, c2v shouldn't be panicing in the case that it can't find clang - it should give a nice error message telling you to make clang available.

@JalonSolov JalonSolov added the Bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants