Author Topic: compiling with ... (Dev++4 for example)  (Read 2501 times)

weedkiller

  • Draco Rider
  • *****
  • Posts: 277
    • View Profile
compiling with ... (Dev++4 for example)
« on: 4 June 2007, 09:28:37 »
Hello, [skip what you dont like]

[some dreams]
don't call me stupid, but i want to try compiling glest. well, my aim is to change some code of glest (something i could be able for: multi-attackanis, some advanced hero-support, not just levels). also i will try to understand the working of ai, in order to optimize the techtrees in our mods and of course, as a shadow on the horizont(?) ... multiplayer

[my skills at the moment]
ok, i must mention that i am not close to c++, i have good understanding for pascal (but delphi, so memoryhandling and stuff like this has not been my work...), i also have made a chat-program (lan) and a basic openGL program (you could run and rotate by the mouse, the only "physik" was: the camera and modell was placed on the ground, the 3d-landscape was kind of 2d (no "tunnels" in it). so i already was contacted with some network-code (simple socket-communication) and api (of course i used a template for the windows-stuff)
i read many c++-tutorials in the last days and i have now a basic understanding of c++ (syntax, some pointer-operations etc.), but of course i am not able to understand the glest-sourcecode since i did't get behind the many files. this is also a problem whitch remains, when i want to compile it:

[compiling problems]
i tried to use the intructions for glest1.0 (see https://docs.megaglest.org) for glest2.0 sourcecode, but it was also for another programm (visual VC, not Dev++4). so i could only guess what the corresponding properties are in my program.
I started with the "sharedlibrary". what should i use as projekt-template? i have to use one, or is there a "main-file" in the glest-code that i only have to compile(with all its included"childrenfiles")?
well, as there was talked about "static library" i chose a *.DLL, but this is "dynamic link library". can it be the same?
since dev++ doesnot copy files into the project-path but just opens and uses the given files, i simply copied the "sharedlibrarysource" into two subdirectionaries called "header files" and "source files". than i decided some special folders to be used: (is it right to choose, or must all be used?)
in graphics:
- subfolder "GL" , not "GL2" or "D9D"
in platform:
- subfolder "win32", not "SDL" (3. one?)
in sounds:
- "openal" , not "ds8"

well, could it work with this? can you give some explanations?

i have also problems with linking: the compiler says that for example in "texture_manager.cpp" the file "texture_manager.h" is not found, and it wants a "texture_manager.o" file whitch should be a binary compiled version of "texture_manager.cpp". but all these files (exept *.o) is included in the project and even listet in it. must i set more include-path, or what is this? and, why does it search *.o, shouldnot it create the binaries itself out of the *.cpp ?

hmm, and last, i am not sure which librarys (SDL, xerxes, ogg) to use.
i used most of the ones mentioned in the wiki, but i could not get the mentioned version of SDL and xerxes. the last one should be working i think, but what about SDL? when there are false names ("stinct.h" as "SDL_stinct.h") should i better rename in glest-source than in the SDL-package?

and, last but not least; i couldnot find the lib-path for the project. i found an include-path and set many of them (like in the tutorial) but the only lib-path-settings appear under "compiler configuration". can this be compatible?

well, i cannot expect someone to have an answer for this all, and i still won't be able to make good modifications to the code even if i could compile it ;), but hope dies last...
« Last Edit: 18 June 2016, 14:24:50 by filux »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #1 on: 4 June 2007, 11:05:07 »
Add me to your msn and when we are both on we can work through it. I got it to compile on Linux and I was working on compiling with Dev-C++ on Windows.
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
(No subject)
« Reply #2 on: 4 June 2007, 13:01:33 »
@hailstone: do you have a compiled linux version of the glest editor for me??
« Last Edit: 1 January 1970, 00:00:00 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

weedkiller

  • Draco Rider
  • *****
  • Posts: 277
    • View Profile
(No subject)
« Reply #3 on: 4 June 2007, 16:20:36 »
@hailstone
sorry, i don't like chat like msn, its to fast for me ;) but i have icq maybe you either?

ok, according to compiling:

do you know how Dev++4 works? glest is my first try with this programm, i worked all the time with delphi whitch is quite different. my biggest question is linking. must i link every file to the ones they need??? but why is "include" already in the code if i need to do so? ~~~confused~~~

where did you download the librarys (sdl, ogg, and stuff), maybe it is usefull even for windows.

and even your workflow on linux would be interesting to me (haven't it but i think it is not too different, we have to use the same sourcecode)
« Last Edit: 1 January 1970, 00:00:00 by weedkiller »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #4 on: 5 June 2007, 07:07:41 »
Quote
do you have a compiled linux version of the glest editor for me??

I haven't tried to compile it yet. I'm planning to work on Glest more in a couple of weeks so I'll give it a go then.

@weedkiller
I have signed up to icq now.

When you want to call a method, for example,  that is located in a different source file/header you need to 'include' the other source/header file. The includes haven't been done relatively in the source (meaning instead of  /ai/{file} it just has /{file}) so each directory will need to be added in the project options so Dev-c++ will know where they are  (like it says in the wiki). Since Glest has a static library (shared_lib) you will need to add that and its directories to the project options. The same goes for the other libraries. Links to them are on the wiki. It's basically the same as Visual Studio. I found there were some clashes with file names.
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

weedkiller

  • Draco Rider
  • *****
  • Posts: 277
    • View Profile
(No subject)
« Reply #5 on: 5 June 2007, 11:29:56 »
thank you. i need some time to find out if i got it now.
ok, i must set all pathes to the include options and there should't be any error finding files. then i will see the errors by the "included" librarys(sdl), the file-errors drove them out of the list...
i can send my icq number to you by pm, will do this later.
« Last Edit: 1 January 1970, 00:00:00 by weedkiller »