Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/135.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法编译C++;在JGrasp中 我试图在C++上编译一个简单的Hello World程序,但是我得到以下错误 ----jGRASP exec: g++ -g -o jGHello.exe jGHello.cpp -lglu32 -lfreeglut -lopengl32 c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lfreeglut collect2.exe: error: ld returned 1 exit status ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete._C++_Compiler Errors_Compilation_Jgrasp - Fatal编程技术网

无法编译C++;在JGrasp中 我试图在C++上编译一个简单的Hello World程序,但是我得到以下错误 ----jGRASP exec: g++ -g -o jGHello.exe jGHello.cpp -lglu32 -lfreeglut -lopengl32 c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lfreeglut collect2.exe: error: ld returned 1 exit status ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete.

无法编译C++;在JGrasp中 我试图在C++上编译一个简单的Hello World程序,但是我得到以下错误 ----jGRASP exec: g++ -g -o jGHello.exe jGHello.cpp -lglu32 -lfreeglut -lopengl32 c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lfreeglut collect2.exe: error: ld returned 1 exit status ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete.,c++,compiler-errors,compilation,jgrasp,C++,Compiler Errors,Compilation,Jgrasp,我认为jGrasp无法编译程序,因为缺少-lfreeglut。但我在互联网上找不到任何关于它的内容。编译器找不到-lfreeglut,原因可能有两个: 它不存在(查看它是否已经安装) LI>不在LIBS路径上,那么你就要在LIBS路径上安装它,或者告诉C++编译器,这个LIB在哪里,U可以像L/PATTROIB < /P>那样做它。 Ej:g++-g-o jghhello.exe jghhello.cpp-lglu32-lfreeglut-lopengl32-L/pathToLib(2)解

我认为jGrasp无法编译程序,因为缺少-lfreeglut。但我在互联网上找不到任何关于它的内容。

编译器找不到-lfreeglut,原因可能有两个:

  • 它不存在(查看它是否已经安装)

  • <> LI>不在LIBS路径上,那么你就要在LIBS路径上安装它,或者告诉C++编译器,这个LIB在哪里,U可以像L/PATTROIB < /P>那样做它。 Ej:g++-g-o jghhello.exe jghhello.cpp-lglu32-lfreeglut-lopengl32-L/pathToLib

    (2)解决了这个问题。谢谢