We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I am wrapping the odbc sql.h in linux using c2v but seems like the out file does not compile.
Repro steps: (I copied the sql.h from /usr/include to v repo)
bash:~/code/vlang/v/vlib/mssql$ ~/code/vlang/c2v/c2v wrap ./sql.h C to V translator 0.3.1 translating ./sql.h ... sql.v:101:15: error: unexpected token `(`, expecting name 99 | interval_type SQLINTERVAL 100 | interval_sign SQLSMALLINT 101 | intval Union (anonymous union at /usr/include/sqltypes.h | ^ 102 | } 103 | type SQLBIGINT = int Internal vfmt error while formatting file: ./sql.v. Encountered a total of: 1 errors. took 1254 ms ; output .v file: ./sql.v Translated 1 files in 1254 ms.
Problematic c code is this typedef enum in sqltypes.h
#if (ODBCVER >= 0x0300) typedef enum { SQL_IS_YEAR = 1, SQL_IS_MONTH = 2, SQL_IS_DAY = 3, SQL_IS_HOUR = 4, SQL_IS_MINUTE = 5, SQL_IS_SECOND = 6, SQL_IS_YEAR_TO_MONTH = 7, SQL_IS_DAY_TO_HOUR = 8, SQL_IS_DAY_TO_MINUTE = 9, SQL_IS_DAY_TO_SECOND = 10, SQL_IS_HOUR_TO_MINUTE = 11, SQL_IS_HOUR_TO_SECOND = 12, SQL_IS_MINUTE_TO_SECOND = 13 } SQLINTERVAL; #endif
Corresponding v code is :
struct SQL_INTERVAL_STRUCT { interval_type SQLINTERVAL interval_sign SQLSMALLINT intval Union (anonymous union at /usr/include/sqltypes.h }
c2v commit:
commit d7ac0c7b6830943c5441c94e17e62667a62e4934 (HEAD -> master, origin/master, origin/HEAD) Author: Alexander Medvednikov <alexander@vlang.io> Date: Sun Jun 26 17:06:18 2022 +0300 tests: remove unused files
v version:
V 0.2.4 28068e8
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I am wrapping the odbc sql.h in linux using c2v but seems like the out file does not compile.
Repro steps: (I copied the sql.h from /usr/include to v repo)
Problematic c code is this typedef enum in sqltypes.h
Corresponding v code is :
c2v commit:
v version:
The text was updated successfully, but these errors were encountered: