LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   I have a make file and source file. I want to use Kdevelop (https://www.linuxquestions.org/questions/programming-9/i-have-a-make-file-and-source-file-i-want-to-use-kdevelop-491643/)

JonBrant 10-11-2006 10:19 PM

I have a make file and source file. I want to use Kdevelop
 
Hiya. I downloaded the Linux code from Nehe's Gamedev site on OpenGL http://nehe.gamedev.net/data/lessons...esson02.tar.gz
That file

It compiles and runs in make just fine, but I want to use Kdevelop

How do I create a project using those files? I tried just make a new project and copying/pasting the code from the source file, but it won't build... so I'm at a loss. Anyone?

In particular, this is the output when I try to build it...

Code:

cd '/home/Jon/testing/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k
gmake all-recursive
Making all in src
/bin/sh ../libtool --tag=CXX --mode=link g++ -O0 -g3 -o testing testing.o
g++ -O0 -g3 -o testing testing.o
testing.o: In function `keyPressed(unsigned char, int, int)':
/home/Jon/testing/src/testing.cpp:95: undefined reference to `glutDestroyWindow'
testing.o: In function `DrawGLScene()':
/home/Jon/testing/src/testing.cpp:58: undefined reference to `glClear'
/home/Jon/testing/src/testing.cpp:59: undefined reference to `glLoadIdentity'
/home/Jon/testing/src/testing.cpp:61: undefined reference to `glTranslatef'
/home/Jon/testing/src/testing.cpp:62: undefined reference to `glRotatef'
/home/Jon/testing/src/testing.cpp:64: undefined reference to `glBegin'
/home/Jon/testing/src/testing.cpp:65: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:66: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:67: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:68: undefined reference to `glEnd'
/home/Jon/testing/src/testing.cpp:70: undefined reference to `glTranslatef'
/home/Jon/testing/src/testing.cpp:71: undefined reference to `glColor3f'
/home/Jon/testing/src/testing.cpp:73: undefined reference to `glBegin'
/home/Jon/testing/src/testing.cpp:74: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:75: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:76: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:77: undefined reference to `glVertex3f'
/home/Jon/testing/src/testing.cpp:78: undefined reference to `glEnd'
/home/Jon/testing/src/testing.cpp:81: undefined reference to `glutSwapBuffers'
testing.o: In function `ReSizeGLScene(int, int)':
/home/Jon/testing/src/testing.cpp:46: undefined reference to `glViewport'
/home/Jon/testing/src/testing.cpp:48: undefined reference to `glMatrixMode'
/home/Jon/testing/src/testing.cpp:49: undefined reference to `glLoadIdentity'
/home/Jon/testing/src/testing.cpp:51: undefined reference to `gluPerspective'
/home/Jon/testing/src/testing.cpp:52: undefined reference to `glMatrixMode'
testing.o: In function `InitGL(int, int)':
/home/Jon/testing/src/testing.cpp:26: undefined reference to `glClearColor'
/home/Jon/testing/src/testing.cpp:27: undefined reference to `glClearDepth'
/home/Jon/testing/src/testing.cpp:28: undefined reference to `glDepthFunc'
/home/Jon/testing/src/testing.cpp:29: undefined reference to `glEnable'
/home/Jon/testing/src/testing.cpp:30: undefined reference to `glShadeModel'
/home/Jon/testing/src/testing.cpp:32: undefined reference to `glMatrixMode'
/home/Jon/testing/src/testing.cpp:33: undefined reference to `glLoadIdentity'
/home/Jon/testing/src/testing.cpp:35: undefined reference to `gluPerspective'
/home/Jon/testing/src/testing.cpp:37: undefined reference to `glMatrixMode'
testing.o: In function `main':
/home/Jon/testing/src/testing.cpp:106: undefined reference to `glutInit'
/home/Jon/testing/src/testing.cpp:113: undefined reference to `glutInitDisplayMode'
/home/Jon/testing/src/testing.cpp:116: undefined reference to `glutInitWindowSize'
/home/Jon/testing/src/testing.cpp:119: undefined reference to `glutInitWindowPosition'
/home/Jon/testing/src/testing.cpp:122: undefined reference to `glutCreateWindow'
/home/Jon/testing/src/testing.cpp:125: undefined reference to `glutDisplayFunc'
/home/Jon/testing/src/testing.cpp:131: undefined reference to `glutIdleFunc'
/home/Jon/testing/src/testing.cpp:134: undefined reference to `glutReshapeFunc'
/home/Jon/testing/src/testing.cpp:137: undefined reference to `glutKeyboardFunc'
/home/Jon/testing/src/testing.cpp:143: undefined reference to `glutMainLoop'
collect2: ld returned 1 exit status
gmake[2]: *** [testing] Error 1
gmake[2]: Target `all' not remade because of errors.
gmake[2]: Nothing to be done for `all-am'.
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***


JonBrant 10-12-2006 12:37 AM

Figured it out. Import project did the trick

xhi 10-12-2006 11:09 AM

nice work.. glad you got everything squared away. fyi, those errors you listed above are linking errors and in kdevelop you can goto the project options and to either the configure or make tab and you can add in additional libraries.

good luck

JonBrant 10-15-2006 04:49 AM

^ Hrm. Maybe I'm using a different version of Kdevelop? In order to get it working I had to play around in the makefile itself... no idea what I was doing but I've gotten it working. If I could link to them as you described, that would save me... a lot... of headache. I go to project options, but I have no tabs... I have icons on the left "General, Plugins, Version Control, File Templates, Project Documentation, File List, C++ Specific, Run Options, Build Options, Bookmarks, File Groups, Debugger, Ctags, Doxygen, File Tree" but no configure or make tabs. I've been looking for a way to add the libraries from Kdevelop as you said... but I just can't find any. Maybe you could help me clear this up? Would be much appreciated

xhi 10-15-2006 10:07 AM

Quote:

Originally Posted by JonBrant
^ Hrm. Maybe I'm using a different version of Kdevelop? In order to get it working I had to play around in the makefile itself... no idea what I was doing but I've gotten it working. If I could link to them as you described, that would save me... a lot... of headache. I go to project options, but I have no tabs... I have icons on the left "General, Plugins, Version Control, File Templates, Project Documentation, File List, C++ Specific, Run Options, Build Options, Bookmarks, File Groups, Debugger, Ctags, Doxygen, File Tree" but no configure or make tabs. I've been looking for a way to add the libraries from Kdevelop as you said... but I just can't find any. Maybe you could help me clear this up? Would be much appreciated

sorry i was going from memory.. look into the 'Build Options', there should be an area in there to add in extra libs. normally you should not have to edit the makefile manually when using kdevelop..


All times are GMT -5. The time now is 10:16 AM.