1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: 1 error left

This commit is contained in:
Alexander Medvednikov
2020-03-20 20:35:00 +01:00
parent 8077a7534e
commit 4b36098e07
4 changed files with 14 additions and 7 deletions

View File

@@ -49,14 +49,14 @@ pub fn new_cgen(out_name_c string) &CGen {
return &CGen{
}
}
gen := &CGen{
return &CGen{
out_path: path
out: out
// buf: strings.new_builder(10000)
lines: make(0, 1000, sizeof(string))
}
return gen
//return gen
}
fn (g mut CGen) genln(s string) {

View File

@@ -133,8 +133,9 @@ fn find_vs(vswhere_dir string, host_arch string) ?VsInstallation {
println('Unable to find msvc version')
return error('Unable to find vs installation')
}
version2 := version // TODO remove. cgen option bug if expr
// println('version: $version')
v := if version.ends_with('\n') { version[..version.len - 2] } else { version }
v := if version.ends_with('\n') { version2[..version.len - 2] } else {version2 }
lib_path := '$res.output\\VC\\Tools\\MSVC\\$v\\lib\\$host_arch'
include_path := '$res.output\\VC\\Tools\\MSVC\\$v\\include'
if os.exists('$lib_path\\vcruntime.lib') {