Using OpenGL

Darren via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 4 09:09:34 PDT 2016


Back again with another little problem that isn't specifically 
OpenGL related, but is a result of getting such code to work.

Code I'm working on: 
https://dfcode.wordpress.com/2016/10/04/linker-problem/
What I'm learning from: 
http://www.learnopengl.com/#!Getting-started/Camera, 
http://www.learnopengl.com/code_viewer.php?type=header&code=camera

The problem is I'm trying to move camera code into a module and 
import it, but when I try to build I'm getting the following 
error messages:

source\app.d(256,30): Error: function 
'fpscamera.fpsCamera.processMouseMovement' is not nothrow
source\app.d(243,7): Error: function 'app.mouse_callback' is 
nothrow yet may throw

If I add nothrow to processMouseMovement, like I did for some 
other functions, I get the following:

.dub\build\application-debug-windows-x86-dmd_2071-3EF635850CA47CC4E927BFC9336E0233\ogl.obj(ogl)
  Error 42: Symbol Undefined 
_D9fpscamera9fpsCamera13getViewMatrixMxFNdZS4gl3n6linalg21__T6MatrixTfVii4Vii4Z6Matrix
.dub\build\application-debug-windows-x86-dmd_2071-3EF635850CA47CC4E927BFC9336E0233\ogl.obj(ogl)
  Error 42: Symbol Undefined 
_D9fpscamera9fpsCamera20processMouseMovementMFNbffhZv
.dub\build\application-debug-windows-x86-dmd_2071-3EF635850CA47CC4E927BFC9336E0233\ogl.obj(ogl)
  Error 42: Symbol Undefined 
_D9fpscamera9fpsCamera18processMouseScrollMFNbfZv
.dub\build\application-debug-windows-x86-dmd_2071-3EF635850CA47CC4E927BFC9336E0233\ogl.obj(ogl)
  Error 42: Symbol Undefined 
_D9fpscamera9fpsCamera15processKeyboardMFE9fpscamera14CameraMovementfZv
.dub\build\application-debug-windows-x86-dmd_2071-3EF635850CA47CC4E927BFC9336E0233\ogl.obj(ogl)
  Error 42: Symbol Undefined _D9fpscamera12__ModuleInfoZ
--- errorlevel 5

It seems to happen if I make both processMouseMovement and 
processMouseScroll nothrow to get rid of the error messages.  If 
one or the other is nothrow, I get the nothrow message for that 
function.


More information about the Digitalmars-d-learn mailing list