Fatal Error C1083 Unistd.h
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up unistd.h related difficulty when compiling bison & flex program under vc++ up vote 16 down vote favorite 3 I'm using bison & flex (downloaded via cygwin) with vc++. When I compile the program I got an error: ...: fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory The corresponding code in the flex-generated file is: #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ /* %if-c-only */ #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign http://stackoverflow.com/questions/2793413/unistd-h-related-difficulty-when-compiling-bison-flex-program-under-vc up NodeJS - Cannot open include file: 'unistd.h': up vote 1 down vote favorite 1 I am using VisualStudio 2012 and run on a windows 7 machine. I want to execute the command make all under my windows machine. For this I installed Make for Windows. Furthermore, I want to compile node library talib. I opened the make file to execute the commands http://stackoverflow.com/questions/27629653/nodejs-cannot-open-include-file-unistd-h by nodeJS itself. That`s the command I want to run: cd ./src/lib && node build.js && cd ../../ && node-gyp configure && node-gyp build The first part, runs well: cd ./src/lib && node build.js However, running the second partcd ../../ && node-gyp configure && node-gyp build, I get several errors: Kalimini@Kalimini-PC ~/nodeWorkspace/TestProject/node_modules/node-talib-master/sr c/lib (master) $ cd ../../ && node-gyp configure && node-gyp build gyp info it worked if it ends with ok gyp info using node-gyp@1.0.2 gyp info using node@0.10.25 | win32 | ia32 gyp info spawn python gyp info spawn args [ 'c:\\Users\\Kalimini\\AppData\\Roaming\\npm\\node_modules\\n ode-gyp\\gyp\\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=auto', gyp info spawn args '-I', gyp info spawn args 'c:\\Users\\Kalimini\\nodeWorkspace\\TestProject\\node_mod ules\\node-talib-master\\build\\config.gypi', gyp info spawn args '-I', gyp info spawn args 'c:\\Users\\Kalimini\\AppData\\Roaming\\npm\\node_modules\\n ode-gyp\\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'c:\\Users\\Kalimini\\.node-gyp\\0.10.25\\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=c:\\Users\\Kalimini\\.node-gyp\\0.10.25', gyp info spawn args '-Dmodule_root_dir=c:\\Users\\Kalimini\\nodeWorkspace\\CoinA nalytics\\node_modules\\node-talib-master', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args
Sign in Pricing Blog Support Search GitHub This repository Watch 134 Star 895 Fork 266 KhaosT/HAP-NodeJS Code Issues 71 Pull requests 0 Projects 0 Wiki https://github.com/KhaosT/HAP-NodeJS/issues/113 Pulse Graphs New issue node_curve.cc error Cannot open include file: 'unistd.h': No such file or directory #113 Closed nzhome opened this Issue Aug 11, 2015 · 9 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 4 participants nzhome commented Aug 11, 2015 ..\node_curve.cc(6): fatal error C1083: Cannot open include file: 'unistd.h': No fatal error such file or directory gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:269:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12) gyp ERR! System Windows_NT 6.1.7600 gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Program Files\nodejs\node_modules\homebridge-master\node_modules\HAP-NodeJS\node_modules\curve25519 gyp ERR! node -v v0.12.7 gyp ERR! fatal error c1083 node-gyp -v v2.0.1 gyp ERR! not ok Owner KhaosT commented Aug 11, 2015 It appears that Windows doesn't have unistd.h... You can try to use the customized version at here but I'm not sure if other modification may required to get this works. nzhome commented Aug 12, 2015 thanks, do you normally do your build on x86 or x64? I saw your raspberry pi2 on instagram, what o/s do you run on it? this will help me know whether to target x86 or x64 when compiling the version for windows. thanks. oh, and what build of nodeJs do you use? 0.10.0 or 0.12.7 or other? Owner KhaosT commented Aug 12, 2015 Raspberry Pi 2 is ARMv7 arch and runs Raspbian. I used NodeJS 0.12 on both OS X and Raspbian. nzhome commented Aug 12, 2015 yes I created unistd.h from the most popular answer here http://stackoverflow.com/questions/341817/is-there-a-replacement-for-unistd-h-for-windows-visual-c and downloaded getopt.h and getopt.c from here http://www.codeproject.com/Articles/157001/Full-getopt-Port-for-Unicode-and-Multibyte-Microso and I put them into C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ Then YES it compiled curve25519 successfully on windows nodejs 32bit and nodejs 64bit. nzhome closed t