- fix: huge build size for c++ files

This commit is contained in:
Roy Qu 2022-02-11 14:04:18 +08:00
parent cb0fd24ebe
commit 71e885f941
6 changed files with 18 additions and 52 deletions

View File

@ -3,6 +3,7 @@ Red Panda C++ Version 0.14.2
- enhancement: remove / rename / create new folder in the files view
- fix: crash when there are catch blocks in the upper most scope
- fix: can't read project templates when path has non-ascii chars
- fix: huge build size for c++ files
Red Panda C++ Version 0.14.1
- enhancement: custom theme

View File

@ -569,6 +569,9 @@ void Compiler::runCommand(const QString &cmd, const QString &arguments, const Q
env.insert("PATH",path);
}
env.insert("LANG","en");
env.insert("LDFLAGS","-Wl,--stack,12582912");
env.insert("CFLAGS","");
env.insert("CXXFLAGS","");
process.setProcessEnvironment(env);
process.setArguments(splitProcessCommand(arguments));
process.setWorkingDirectory(workingDir);

View File

@ -1,7 +1,7 @@
[
{
"header": "GL/freeglut.h",
"links": "-lfreeglut -lwinmm"
"links": "-lfreeglut.dll -lwinmm"
},
{
"header": "GL/gl.h",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -8,14 +8,22 @@ Category=3D
Category[zh_CN]=3D
[Unit0]
CppName=main.cpp
C=CL_GLUT_cpp.txt
CName=main.c
C=CL_GLUT_shapes.c.txt
[Unit1]
CName=glmatrix.h
C=CL_GLUT_glmatrix.h.txt
[Unit2]
CName=glmatrix.c
C=CL_GLUT_glmatrix.c.txt
[Project]
UnitCount=1
UnitCount=3
Type=0
IsCpp=1
linker=-lm -lfreeglut_static -lopengl32 -lwinmm -lgdi32_@@__@@_
IsCpp=0
linker=-lm -lfreeglut.dll -lopengl32 -lwinmm -lgdi32_@@__@@_

View File

@ -1,46 +0,0 @@
#define FREEGLUT_STATIC
#include <stdlib.h>
#include <GL/glut.h>
void keyboard(unsigned char key, int x, int y);
void display(void);
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutCreateWindow("GLUT Test");
glutKeyboardFunc(&keyboard);
glutDisplayFunc(&display);
glutMainLoop();
return EXIT_SUCCESS;
}
void keyboard(unsigned char key, int x, int y)
{
switch (key)
{
case '\x1B':
exit(EXIT_SUCCESS);
break;
}
}
void display()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0f, 0.0f, 0.0f);
glBegin(GL_POLYGON);
glVertex2f(-0.5f, -0.5f);
glVertex2f( 0.5f, -0.5f);
glVertex2f( 0.5f, 0.5f);
glVertex2f(-0.5f, 0.5f);
glEnd();
glFlush();
}