# Julia Embedding in Windows (winsock2.h not found)

**URL:** https://discourse.julialang.org/t/julia-embedding-in-windows-winsock2-h-not-found/4513
**Category:** General Usage
**Tags:** question, windows, embedding
**Created:** [June 28, 2017, 8:32am UTC](https://discourse.julialang.org/t/julia-embedding-in-windows-winsock2-h-not-found/4513 "2017-06-28T08:32:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tastelessjolt](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tastelessjolt](https://discourse.julialang.org/u/tastelessjolt)
#### Post date: [June 28, 2017, 8:32am UTC](https://discourse.julialang.org/t/julia-embedding-in-windows-winsock2-h-not-found/4513/1 "2017-06-28T08:32:39Z")

</div>

What more directories should I include? And will Julia embedding work with visual studio’s compiler?  
This is actually for an interface for Scilab, a language like Matlab.  
I used cflags, ldflags, ldlibs from `julia-config.jl` file.

This is the command used

```julia
cl -D __MSC__ -DFORDLL -D_WIN64 -c -DSTRICT -D_CRT_SECURE_NO_DEPRECATE -D __MAKEFILEVC__ -nologo -I"C:/PROGRA~1/SCILAB~1.2/libs/MALLOC/includes" -I"C:/PROGRA~1/SCILAB~1.2/libs/f2c" -I"C:/PROGRA~1/SCILAB~1.2/libs/hashtable" -I"C:/PROGRA~1/SCILAB~1.2/libs/intl" -I"C:/PROGRA~1/SCILAB~1.2/modules/core/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/api_scilab/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/call_scilab/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/output_stream/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/jvm/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/localization/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/dynamic_link/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/mexlib/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/time/includes" -I"C:/PROGRA~1/SCILAB~1.2/modules/windows_tools/includes" -W3 -Gd -Z7 -O2 -MD -DNDEBUG /Fo"Release/" /Fd"Release/" -D __SCILAB_TOOLBOX__ -DFORDLL -DJULIA_ENABLE_THREADING=1 -DJULIA_INIT_DIR="I:\scilab-julia-interface\thirdparty\Windows\julia\lib" -I"I:\scilab-julia-interface\thirdparty\Windows\julia\include\julia" bool_conv.c

```

It gives this error.  
`fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory`

Btw, I’m using Windows 10 as a matter of fact.

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)
#### Post date: [June 28, 2017, 1:03pm UTC](https://discourse.julialang.org/t/julia-embedding-in-windows-winsock2-h-not-found/4513/2 "2017-06-28T13:03:12Z")

</div>

Yes, visual studio should work. I’ve done basic tests with c++ and c# in vs2015 recently (on phone, please look in the embedding tag for convo). That missing header is not a julia problem. Calling cl directly is not usually recommended; to get the proper directories either create a VS project, or use cmake, or check stackoverflow, or use ctrl-f in the sdk directory.

Also note that you need 8mb stack for 0.6.

---

<div class="post-metadata">

### Author: ![tastelessjolt](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@tastelessjolt](https://discourse.julialang.org/u/tastelessjolt)
#### Post date: [June 28, 2017, 9:14pm UTC](https://discourse.julialang.org/t/julia-embedding-in-windows-winsock2-h-not-found/4513/3 "2017-06-28T21:14:07Z")

</div>

Actually I can’t use Visual Studio, this compilation is done by Scilab, I can only add more flags. And I’m using 0.5. I’ll try using Visual Studio and get the directories. Thank you.

---

<div class="post-metadata">

### Author: ![ihnorton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihnorton/32/26_2.png) [@ihnorton](https://discourse.julialang.org/u/ihnorton)
#### Post date: [June 29, 2017, 2:22am UTC](https://discourse.julialang.org/t/julia-embedding-in-windows-winsock2-h-not-found/4513/4 "2017-06-29T02:22:19Z")

</div>

First step should often be “google the error message”. e.g.

> <https://stackoverflow.com/questions/19736036/visual-studio-2013-fatal-error-c1083-cannot-open-include-file-winsock2-h-n>

(the mentioned variables should be defined in the vs2015 command prompt)
