github.com/ccccaoqing/test@v0.0.0-20220510085219-3985d23445c0/misc/cgo/testso/test.bat (about)

     1  :: Copyright 2013 The Go Authors.  All rights reserved.
     2  :: Use of this source code is governed by a BSD-style
     3  :: license that can be found in the LICENSE file.
     4  
     5  @echo off
     6  
     7  gcc -c cgoso_c.c
     8  gcc -shared -o libcgosotest.dll cgoso_c.o
     9  if not exist libcgosotest.dll goto fail
    10  go build main.go
    11  if not exist main.exe goto fail
    12  main.exe
    13  goto :end
    14  
    15  :fail
    16  set FAIL=1
    17  :end
    18  del /F cgoso_c.o libcgosotest.dll main.exe 2>NUL