How can I use GLUT with CUDA on MACOSX?

Posted by omegatai on Stack Overflow See other posts from Stack Overflow or by omegatai
Published on 2010-03-23T09:33:32Z Indexed on 2010/03/23 9:53 UTC
Read the original article Hit count: 364

Filed under:
|
|
|
|

Hi,

I'm having problems compiling a CUDA program that uses GLUT on MacOsX. Here is the command line I use to compile the source:

nvcc main.c -o main -Xlinker "-L/System/Library/Frameworks/OpenGL.framework/Libraries -lGL -lGLU" "-L/System/Library/Frameworks/GLUT.framework"

And here is the errors I get:

Undefined symbols: "_glutInitWindowSize", referenced from: _main in tmpxft_00001612_00000000-1_main.o "_glutInitWindowPosition", referenced from: _main in tmpxft_00001612_00000000-1_main.o "_glutDisplayFunc", referenced from: _main in tmpxft_00001612_00000000-1_main.o "_glutInitDisplayMode", referenced from: _main in tmpxft_00001612_00000000-1_main.o "_glutCreateWindow", referenced from: _main in tmpxft_00001612_00000000-1_main.o "_glutMainLoop", referenced from: _main in tmpxft_00001612_00000000-1_main.o "_glutInit", referenced from: _main in tmpxft_00001612_00000000-1_main.o ld: symbol(s) not found collect2: ld returned 1 exit status

I am aware that I haven't specified any lib for GLUT but I just can't find it! Does anybody know where it is? By the way, there doesn't seem to be a way to use the GLUT.framework when compiling with nvcc.

Thanks a lot,

omegatai

© Stack Overflow or respective owner

Related posts about cuda

Related posts about glut