[CLOSED] Native compilation error :Cannot open include file: 'stdio.h'

Started by umen, May 24, 2015, 09:34:29

Previous topic - Next topic

umen

I try to compile the lib from source , getting compilations error
im using win7 64bit with VC2013 in the class path
the error's im getting :
compile-native-platform:
 [Compiler] common_tools.c
 [Compiler] org_lwjgl_system_MemoryUtil.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\src\native\system\common_tools.c)
 [Compiler] org_lwjgl_system_libffi_Closure.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\src\native\system\org_lwjgl_system_MemoryUtil.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\src\native\system\libffi\org_lwjgl_system_libffi_Closure.c)
 [Compiler] org_lwjgl_system_windows_DEVMODE.c
 [Compiler] org_lwjgl_system_windows_DISPLAY_DEVICE.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_DEVMODE.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_DISPLAY_DEVICE.c)
 [Compiler] org_lwjgl_system_windows_Dwmapi.c
 [Compiler] org_lwjgl_system_windows_GLYPHMETRICSFLOAT.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_Dwmapi.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_GLYPHMETRICSFLOAT.c)
 [Compiler] org_lwjgl_system_windows_GUID.c
 [Compiler] org_lwjgl_system_windows_JOYCAPS.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_GUID.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_JOYCAPS.c)
 [Compiler] org_lwjgl_system_windows_JOYINFO.c
 [Compiler] org_lwjgl_system_windows_JOYINFOEX.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_JOYINFO.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_JOYINFOEX.c)
 [Compiler] org_lwjgl_system_windows_Kernel32.c
 [Compiler] org_lwjgl_system_windows_LARGE_INTEGER.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_Kernel32.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_LARGE_INTEGER.c)
 [Compiler] org_lwjgl_system_windows_LOGBRUSH.c
 [Compiler] org_lwjgl_system_windows_LOGPEN.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_LOGBRUSH.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_LOGPEN.c)
 [Compiler] org_lwjgl_system_windows_MSG.c
 [Compiler] org_lwjgl_system_windows_Mmsystem.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_MSG.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_Mmsystem.c)
 [Compiler] org_lwjgl_system_windows_PIXELFORMATDESCRIPTOR.c
 [Compiler] org_lwjgl_system_windows_POINT.c
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_PIXELFORMATDESCRIPTOR.c)
 [Compiler] c:\Program Files\Java\jdk1.6.0_38\jre\..\include\jni.h(21) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory (D:\dev\cpp\3d\game_engines\java\lwjgl3-master\lwjgl3-master\generated\native\system\windows\org_lwjgl_system_windows_POINT.c)
 [Compiler] org_lwjgl_system_windows_POINTFLOAT.c
...


and so on .. , the java compilation working just fine .
what do i miss here ?

spasi

Have you run "vcvarsall x64" or "vcvarsall x86_amd64" before ant?

umen

Thanks , every time missing the part to run this via VC CLI window
but now i have another linking  error :
[Linker]    Creating library lwjgl.lib and object lwjgl.exp
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwInit@8
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwTerminate referenced in function _Java_org_lwjgl_glfw_GLFW_glfwTerminate@8
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetVersion referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetVersion@32
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetVersionString referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetVersionString@8
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetErrorCallback referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetErrorCallback@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetMonitors referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetMonitors@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetPrimaryMonitor referenced in function _Java_org_lwjgl_glfw_GLFW_glfwGetPrimaryMonitor@8
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetMonitorPos referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetMonitorPos@32
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetMonitorPhysicalSize referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetMonitorPhysicalSize@32
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetMonitorName referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetMonitorName@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetMonitorCallback referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetMonitorCallback@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetVideoModes referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetVideoModes@24
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetVideoMode referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetVideoMode@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetGamma referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetGamma@20
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetGammaRamp referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetGammaRamp@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetGammaRamp referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetGammaRamp@24
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwDefaultWindowHints referenced in function _Java_org_lwjgl_glfw_GLFW_glfwDefaultWindowHints@8
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwWindowHint referenced in function _Java_org_lwjgl_glfw_GLFW_glfwWindowHint@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwCreateWindow referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwCreateWindow@40
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwDestroyWindow referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwDestroyWindow@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwWindowShouldClose referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwWindowShouldClose@16
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetWindowShouldClose referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetWindowShouldClose@20
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetWindowTitle referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetWindowTitle@24
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetWindowPos referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetWindowPos@32
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetWindowPos referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetWindowPos@24
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetWindowSize referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetWindowSize@32
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwSetWindowSize referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwSetWindowSize@24
   [Linker] org_lwjgl_glfw_GLFW.obj : error LNK2019: unresolved external symbol _glfwGetFramebufferSize referenced in function _Java_org_lwjgl_glfw_GLFW_nglfwGetFramebufferSize@32
...and so on ....

Kai

Hi,
when I build LWJGL3 for myself from the Github repository, I do this and it so far always worked.
I too have Windows 7 x64 and Visual Studio 2013 (Community Edition):
- make a clean git clone of https://github.com/LWJGL/lwjgl3.git
- go to "Start" -> "All programs" -> "Visual Studio 2013" -> "Visual Studio Tools"
- the last step opens the Windows Explorer under "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts"
- there you find the "VS2013 x64 Native Tools Command Prompt" which is a link that executes this:
  %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" amd64
  (I usually create a copy of this link on the "favorites" space in "Start" to save navigating to that VS2013 entry all the time)

This opens the cmd with all variables setup for a native x64 build.
Then I "cd" into lwjgl3, add ant to PATH, and execute ant.

spasi

Quote from: umen on May 24, 2015, 18:27:47Thanks , every time missing the part to run this via VC CLI window
but now i have another linking  error :
...

Looks like you're running ant with a x86 JVM, switch to a x64 JVM and it should work fine. In general, make sure the architecture you pass to vcvarsall matches the JVM architecture.

Quote from: Kai on May 24, 2015, 19:15:23when I build LWJGL3 for myself from the Github repository, I do this and it so far always worked.
...

I find it easier to just have vcvarsall.bat available in %PATH%. I run this script before an LWJGL build:

@ECHO OFF
IF "%1" == "x86" (
	call javaenv x86 7
) ELSE (
	call javaenv x64 7
)
SET JAVA6_HOME=C:\Program Files\Java\jdk1.6.0
vcvarsall %*


where javaenv is another script that sets JAVA_HOME to the appropriate JVM.