# help compile project using Kdevelop

This topic is 4759 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi, for days i have been trying to compile the server to my game on Linux (Fedora Core 3, using Kdevelop). now, finnally after i set up all the libraries, includes, and fixed all the errors, now what? when i click build, it builds everything with no errors, and the last message is "*** Exited with status: 2 ***". i didnt see any linker messages though, do i have to link it myself or something? when i click debug->run, it says "blah/blah is no such file or directory". if i click Build->execute program, it just gives this output in the "messages" tab: cd '/root/fta_server/fta_serv/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k -j1 *** Exited with status: 2 *** so, anyone hav any clue what the problem could be? thanks for any help.

##### Share on other sites
it seems i cant find much help for this problem searching google and talking to people on IRC.

however, i really dont need kdevelop. i just want to get this compiled. ive tried writing the makefile with help from someone but i still cant get it to work. when i use it, i get this output:
[root@ool-4573224b fta_server]# makemake: Circular fta_server/Collision_Object.o <- fta_server/Collision_Object.o dependency dropped.g++ -Wall -pedantic sdl-config --cflags -I/root/raknet/RakNetEVERYTHING!/Source -c  -o fta_server/Collision_Object.og++: no input filesmake: *** [fta_server/Collision_Object.o] Error 1

and this is what the makefile looks like:

thanks again.

##### Share on other sites
Change -I/usr/include/SDL to -I/usr/include/SDL/include

##### Share on other sites
err..nevermind that last post, I'm talking in my sleep. Do make sure that the SDL.h is where it should be, though.

##### Share on other sites
It sounds from his post like it is, but yeah, I can't see what the problem is either...

##### Share on other sites
This sort of seems to work, aside from me not having any of the files or this mysterious raknet thingy.
#use "g++" to compile source files.CC = g++ -c#use "g++" to link the object files.LD = g++#Compiler flags:CFLAGS := -Wall -pedantic sdl-config --cflags -I/root/raknet/RakNetEVERYTHING!/Source#Linker flags:LDFLAGS := sdl-config --libs#Clean-up command:RM = rm -f# The list of source files:SRCS = Collision_Object.cpp Database.cpp Entity.cpp main.cpp Map.cpp Memory_Managed_Object.cpp Network_Server.cpp Player.cpp Projectiles.cpp System.cpp Character.cpp     #Libraries to include when linking:LIBS = /usr/local/lib/libmysqlpp.a /root/raknet/RakNetEVERYTHING!/bin/raknet.2.0.13.a# program executable file name.PROG = gf_server# list of generated object files.OBJS = $(foreach file,$(SRCS),fta_server/$(file:%.cpp=%.o))######## RULES ######### Targets that aren't real files.PHONY: all clean# Top-level rule: compile everythingall:$(PROG)	@echo "Source:  $(SRCS)" @echo "Objects:$(OBJS)"# The program link rule:$(PROG):$(OBJS)	$(LD)$(LDFLAGS) $^$(LIBS) -o $(PROG)# Meta rule for compiling ".o" filesfta_server/%.o: %.cpp$(CC) $(CFLAGS) -c$< -o $@$(CC) -MM $(CFLAGS)$< -MF$(@:fta_server/%.o=%.depend) -MT$@# Rule for cleaning up before a recompile:clean:	$(RM)$(PROG) $(OBJS)$(wildcard *.depend)# Include dependency information if it exists:ifneq ($(strip$(wildcard *depend)),)include $(wildcard$(wildcard *.depend))endif

Note: sdl-config --cflags will include all the junk you need for SDL, but you need to use #include "SDL.h" in your source, not #include <SDL.h> or #include "sdl.h".

##### Share on other sites
thanks everyone.. i tried using smart_idiot's script, but still no luck, i get the same erros all dealing with SDL types being un-declared, including one error saying SDL.h does not exist..

*secretly starts searching for Windows 2000 boot disk*

##### Share on other sites
I just noticed that SDL uses long long, and pedantic doesn't like that, so you might want to add -Wno-long-long to CFLAGS, not that it would fix your problem.

Try compiling something really simple, like this:
// foo.cpp#include "SDL.h"int main() {  return 0; }

g++ sdl-config --cflags --libs foo.cpp -o foo

If it doesn't work, then SDL probably isn't installed correctly.

##### Share on other sites
hi smart_idiot,

i guess i wasnt kidding when i said i was secretly looking for the Windows disk. i can happily say that i gave up on Linux and now am running on Windows [grin].

this is for the dedicated server for my MORPG. i put togeather the machine and installed Fedora on it. but i was having a hell of a time trying to get the server to compile. furthermore, i was getting a lot of problems trying to setup the MySQL database as well (i got errors manually dowloading and using the installer script, using yum, using apt-get, AND using up2date). after ripping out all my hair for days i decided to just go with Windows.

the only reason i was using Linux in the first place was because Windows didnt support RAID 1, however i have found a solution to this problem. im just going to write a Python script that will periodically make a copy of the database onto the second HD. ironically, i think this will be better then RAID 1 since it will be faster to make writes and will use less disk space. (plus i can have the script do other things, like compress the data first, make archives, upload to a web server, etc..)

##### Share on other sites
Well, so long, then.