Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3003


This forum is provided to promote discussion amongst students enrolled in Graphics and Animation (CITS3003).
 
Options:
RSS cloud
Jump to:

Compiling errors about scene-start.cpp

3 of 306 articles shown, currently no other people reading this forum.
photo
From: ANONYMOUS
Date: Tue 7th Apr, 8:26pm
Actions: 
        Login-to-reply

 

Hello, 

When I was trying to make an executable file with the original scene-start.cpp, 4 errors 
generated as below:
-----------------------------------------------------------------------------
scene-start.cpp:138:9: error: redefinition of 'buffer' with a different type:
      'GLuint [2]' vs 'GLuint [1]'
        GLuint buffer[2];
               ^
scene-start.cpp:126:12: note: previous definition is here
    GLuint buffer[1];
           ^
scene-start.cpp:141:43: error: use of undeclared identifier 'points'
    glBufferData( GL_ARRAY_BUFFER, sizeof(points), points, GL_STATIC_DRAW );
                                          ^
scene-start.cpp:141:52: error: use of undeclared identifier 'points'
    glBufferData( GL_ARRAY_BUFFER, sizeof(points), points, GL_STATIC_DRAW );
                                                   ^
scene-start.cpp:142:45: error: use of undeclared identifier 'program'
    GLuint vPosition = glGetAttribLocation( program, "vPosition" );
-----------------------------------------------------------------------------

They are all relative to "Mesh loading" with the Open Asset Importer library. 
You may see a GLunit Array named by "buffer" defined twice. 
Variables "points" and "program" are not correctly defined. 
I tried to address it but...
Does it suggest that the pre-compiled libassimp is not working on my personal computer? I'm 
using macOS 10.15.3.

Thanks.

Compiling errors about scene-start.cpp

photo
From: Matthew C.
Date: Tue 7th Apr, 8:34pm
Actions: 
        Login-to-reply

 

All these errors are syntactical/semantical and originate in the scene-start.cpp file, so no it has nothing to do with your assimp install.

Comparing the code for LINUX and MAC you can see that all the code on the MAC version between lines 136 and 144 are not present on LINUX, that is because these are not needed, but a part of the solution to one the questions, either delete or comment out these lines and things then should be as they were meant to be.

Compiling errors about scene-start.cpp

photo
From: ANONYMOUS  O.P.
Date: Tue 7th Apr, 9:07pm
Actions: 
        Login-to-reply

 

I guessed so. I had tired comment out those codes, but I didn't check the Linux version and I couldn't confirm it. Thanks a lot.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020