Skip to content

Commit 4ad41b0

Browse files
committed
windows build
1 parent 6961e76 commit 4ad41b0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

libxtracfg/go/xtracfg/client.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package xtracfg
33
/*
44
#cgo CFLAGS: -I ../../c/include
55
#cgo LDFLAGS: -L../../c/build -lxtracfg
6+
#cgo windows LDFLAGS: -L../../c/build -lxtracfg -lxtracfgjni_static_ext
67
78
#include <stdlib.h>
89
#include "libxtracfg.h"
@@ -129,17 +130,15 @@ func (store Store) Handle(parameters map[string]interface{}, command string, sub
129130
return nil, fmt.Errorf("Error: %s", *response.Error)
130131
}
131132

132-
133133
if response.Results == nil {
134134
return []Result{}, nil
135135
}
136136

137-
138137
for i := range *response.Results {
139-
(*response.Results)[i].Details = response.Details
140-
}
138+
(*response.Results)[i].Details = response.Details
139+
}
141140

142-
return *response.Results, nil
141+
return *response.Results, nil
143142
}
144143

145144
func (store Store) request(parameters map[string]interface{}, command string, subcommands ...string) (response *Response, err error) {
@@ -149,10 +148,8 @@ func (store Store) request(parameters map[string]interface{}, command string, su
149148
parameters["subcommand"] = subcommands[0]
150149
}
151150

152-
153151
request, err := json.Marshal(parameters)
154152

155-
156153
if err != nil {
157154
return nil, fmt.Errorf("Error: Failed to marshal the request body. %s", err)
158155
}

libxtracfg/js/xtracfg-native-binding/binding.gyp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
"OTHER_CFLAGS": [ "-fPIC"]
1717
},
1818
'msvs_settings': {
19-
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
19+
'VCCLCompilerTool': {
20+
'RuntimeLibrary': 2, # /MD
21+
'ExceptionHandling': 1,
22+
},
2023
'VCLinkerTool': {
2124
'IgnoreDefaultLibraryNames': [ 'LIBCMT' ],
2225
'AdditionalOptions': [

0 commit comments

Comments
 (0)