windows


Using cgo on windows


I find this really frustrating, I have go installed on windows, how do I use cgo? Do I need mingw installed? Is this exclusive to UNIX-like environments? Do I need make?
What I tried:
1. Installed mingw
2. And put mingw into PATH so when I type gcc, I can compile from cmd
3. I attempt to use cgo and It complains about missing include files
package cgoexample
/*
#include <stdio.h>
#include <stdlib.h>
void myprint(char* s) {
printf("%s\n", s);
}
*/
import "C"
import "unsafe"
func Example() {
cs := C.CString("Hello from stdio\n")
C.myprint(cs)
C.free(unsafe.Pointer(cs))
}

Related Links

ASSIGN win XP commandline output to variable
How can I enumerate sockets on a given windows process?
How do you loop through each line in a text file using a windows batch file?
Adobe AIR non-Administrator application installation/upgrade on Windows
Control multiple PCs with single Mouse and Keyboard
How do I record the time every time I log on and log off of Windows XP?
Best way to update multi-gigabyte program (DVD fulfillment? Updater software?)
Is it possible to modify a registry entry via a .bat/.cmd script?
Is there a folder in both WinXP and WinVista to which all users have writing permissions?
Batch rename issue when dealing with special characters in the filename
How to find whether a Windows user belongs to specified group?
Windows CPU notification for misbehaving ColdFusion application
VIM Ctrl-V Conflict with Windows Paste
Programmatic Signing of Native Windows Mobile Apps
How to get date/time when file was placed in a directory on Windows?
Is there an API for vista to detect if the desktop is running full screen?

Categories

HOME
oracle12c
spark-streaming
phpmyadmin
themes
package
3d-reconstruction
pyqt4
crystal-lang
nfs
joomla3.0
okhttp
mql5
datastage
internationalization
azure-iot-hub
glyphicons
dynamic-sql
wolframalpha
delphi-xe5
systemtime
ember-cli
interpreter
ckfinder
pic32
jackson-modules
constexpr
corenlp-server
userdefaults
zend-debugger
biztalk-rule-engine
vue-chartjs
joomla2.5
hunspell
reverse
ideascript
node-mssql
apns-php
mongoose-schema
setup.py
naming
plr
oracle-service-bus
flask-login
facebook-social-plugins
double-click
getchar
activeperl
modelsim
spring-data-couchbase
oracleclient
vcloud-director-rest-api
ziparchive
centrifuge
flex4.6
android-dateutils
vorpal.js
stream-processing
tracker-enabled-dbcontext
ellucian-scribe
piracy-prevention
highland.js
jnlua
qt5.2
morton-number
video-player
cgi-bin
finalbuilder
atoi
haskell-warp
wso2greg
sql-server-data-tools
node-serialport
zxspectrum
java-security
dbaccess
rapidsvn
formview
personalization
memset
multitasking
scriptaculous
modular
epiceditor
video-codecs
panda3d
box2d-iphone
entity-attribute-value
drawtobitmap
multiplatform
django-paypal
collectionviewsource
nhprof
resharper-6.0
ie-compatibility-mode
binomial-heap
folding
spread
flvplayback
idatareader

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App