compiling in windows

miguel
2003-08-27
2013-04-22
  • miguel

    miguel - 2003-08-27

    Hi,

    I wondering if is possible to compile your game in windows, and if so, how??

    Which compile should I use??

     
    • Thomas Hudson

      Thomas Hudson - 2003-08-27

      Yes it is possible.
      I can only tell you that I use Dev-C++ in combination with Mingw32 to compile the win32 versions of atanks.

      If you need any further details I'll try my best  to answer your questions, though installing/setting it all up was a bit trial and error for me so I can't guarantee remembering exactly what I did.

      Tom

       
    • miguel

      miguel - 2003-08-27

      Hi Tom,

      I download Dev-C++ and all403.zip, I try to compile but I get to much errors.

      Here I display some errors:

      In file included from C:/Programas/Dev-Cpp/include/allegro/internal/alconfig.h:33,
                       from C:/Programas/Dev-Cpp/include/allegro/base.h:36,
                       from C:/Programas/Dev-Cpp/include/allegro.h:29,
                       from main.h:24,
                       from virtobj.h:24,
                       from globals.h:24,
                       from atanks.cc:21:
      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h:20:19: pc.h: No such file or directory
      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h:22:21: dpmi.h: No such file or directory

      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h:23:21: go32.h: No such file or directory
      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h:26:27: sys/farptr.h: No such file or directory
      In file included from C:/Programas/Dev-Cpp/include/allegro/internal/alconfig.h:33,
                       from C:/Programas/Dev-Cpp/include/allegro/base.h:36,
                       from C:/Programas/Dev-Cpp/include/allegro.h:29,
                       from main.h:24,
                       from virtobj.h:24,
                       from globals.h:24,
                       from atanks.cc:21:
      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h: In function `void
         bmp_write24(long unsigned int, int)':
      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h:83: `_farnspokew'
         undeclared (first use this function)
      C:/Programas/Dev-Cpp/include/allegro/platform/aldjgpp.h:83: (Each undeclared
         identifier is reported only once for each function it appears in.)

      Please help

       
      • Thomas Hudson

        Thomas Hudson - 2003-08-28

        Have you installed Mingw32?
        It's just a guess but it looks like it could be that you need.

         
    • miguel

      miguel - 2003-08-28

      yes I have.

      now I get this errors:
      -------------------------------------------------
      gensound.cc: In member function `void GENSOUND::genThunder()':

      gensound.cc:57: `SOUNDLEN' undeclared (first use this function)
      gensound.cc:57: (Each undeclared identifier is reported only once for each
         function it appears in.)
      gensound.cc:58: `offset' undeclared (first use this function)

      gensound.cc: In function `void processPoint(short int*, int, int)':
      gensound.cc:104: call of overloaded `sqrt(int)' is ambiguous
      C:/Dev-Cpp/include/allegro/inline/fix.inl:128: candidates are: fix sqrt(fix)
      C:/Dev-Cpp/include/math.h:166:                 double sqrt(double)
      C:/Dev-Cpp/include/c++/cmath:465:                 long double std::sqrt(long
         double)

      C:/Dev-Cpp/include/c++/cmath:461:                 float std::sqrt(float)
      gensound.cc:105: warning: initialization to `int' from `double'
      gensound.cc:105: warning: argument to `int' from `double'

      gensound.cc: In function `void processLineSound(short int*, int, int, int,
         int)':
      gensound.cc:129: call of overloaded `sqrt(int)' is ambiguous
      C:/Dev-Cpp/include/allegro/inline/fix.inl:128: candidates are: fix sqrt(fix)
      C:/Dev-Cpp/include/math.h:166:                 double sqrt(double)
      C:/Dev-Cpp/include/c++/cmath:465:                 long double std::sqrt(long
         double)
      C:/Dev-Cpp/include/c++/cmath:461:                 float std::sqrt(float)

      C:/Dev-Cpp/include/time.h: In function `int _mangled_main(int, char**)':
      C:/Dev-Cpp/include/time.h:97: too few arguments to function `time_t

         time(time_t*)'
      gensound.cc:161: at this point in file
      gensound.cc:165: `soundBuf' undeclared (first use this function)
      gensound.cc:167: `genThunder' undeclared (first use this function)

      -------------------------------------------------

      it seems that this couldn't be the source used to compile the game, it miss the declarations of some variables!!!!!!

       
      • Thomas Hudson

        Thomas Hudson - 2003-08-28

        You don't need to compile gensound, it's not used yet so everything works without it.
        It's ultimately supposed to produce dynamic sound, generated on the fly (thunder initially, possibly explosions).

         
    • miguel

      miguel - 2003-08-28

      Thanks Thomas you were right.

      But Now I'm getting:

      -------------------------------------------------
      Compiler: Default compiler
      Building Makefile: "C:\Documents and Settings\Miguel\Ambiente de trabalho\atanks\atanks_scr\src\Makefile.win"
      Executing  make...
      make.exe -f "C:\Documents and Settings\Miguel\Ambiente de trabalho\atanks\atanks_scr\src\Makefile.win" all
      g++.exe atanks.o beam.o decor.o environment.o explosion.o floattext.o globaldata.o missile.o physobj.o player.o tank.o teleport.o virtobj.o  -o "Project2.exe" -L"C:/Dev-Cpp/lib"

      atanks.o(.text+0x1481):atanks.cc: undefined reference to `getr'
      atanks.o(.text+0x1492):atanks.cc: undefined reference to `getg'
      atanks.o(.text+0x14a3):atanks.cc: undefined reference to `getb'
      atanks.o(.text+0x14b4):atanks.cc: undefined reference to `getr'
      atanks.o(.text+0x14c5):atanks.cc: undefined reference to `getg'
      atanks.o(.text+0x14d6):atanks.cc: undefined reference to `getb'
      atanks.o(.text+0x1529):atanks.cc: undefined reference to `vector_length_f'
      atanks.o(.text+0x1be0):atanks.cc: undefined reference to `rect'
      atanks.o(.text+0x1bf0):atanks.cc: undefined reference to `drawing_mode'
      atanks.o(.text+0x1c00):atanks.cc: undefined reference to `set_trans_blender'
      atanks.o(.text+0x1d91):atanks.cc: undefined reference to `makecol'
      atanks.o(.text+0x1dac):atanks.cc: undefined reference to `circlefill'
      atanks.o(.text+0x1ea6):atanks.cc: undefined reference to `makecol'
      atanks.o(.text+0x1efd):atanks.cc: undefined reference to `solid_mode'

      atanks.o(.text+0x204c):atanks.cc: undefined reference to `_imp__screen'
      atanks.o(.text+0x2056):atanks.cc: undefined reference to `blit'
      atanks.o(.text+0x20e7):atanks.cc: undefined reference to `_imp__screen'
      atanks.o(.text+0x20f1):atanks.cc: undefined reference to `blit'
      atanks.o(.text+0x2176):atanks.cc: undefined reference to `_imp__screen'
      atanks.o(.text+0x2180):atanks.cc: undefined reference to `blit'
      atanks.o(.text+0x220a):atanks.cc: undefined reference to `_imp__screen'
      atanks.o(.text+0x2214):atanks.cc: undefined reference to `blit'
      -------------------------------------------------

      I didn't had any lib or dll to the project or to the directory were the source is.

      Is that the problem?? If so, which fies should I add??

      thanks

       
    • miguel

      miguel - 2003-08-29

      Thanks thomas that work

       
    • miguel

      miguel - 2003-08-29

      Hi thomas (I hope you don't mind I just call you thomas),

      To tell the truth, I more use to use compiles such as Delphi or Borland C++, so I have some questions about Dev-C++. I try to debug the game but I get a message error:

      " An Access Violation (Segmention Fault) raises in your program."

      Can you explain this??

      This is the first time that I take a someone else project and try to make some change, hopefully to improve.

      I get this error, when I try to get the players name, using the command player->getName();
      -------------------------------------------------
      tank.cc: In constructor `TANK::TANK(GLOBALDATA*, ENVIRONMENT*)':
      tank.cc:91: request for member `setName' in `this->VIRTUAL_OBJECT::player',

         which is of non-aggregate type `PLAYER*'
      -------------------------------------------------

      I'm going to make a small critic, for me I think that your code has comments lack.

      I also would like to know where the best place to post my questions, here, by mail, or other way.

      miguel

      P.S - English isn't my native language so, expect some errors

       
      • Thomas Hudson

        Thomas Hudson - 2003-08-31

        What's the line of code (92 in tank.cc) that is causing the error? It looks like a pointer is not being dereferenced at a guess. Are you calling player.setName or player->setName?
        It should probably be the latter (assuming certain things it's not worth going into right now).
        The code does lack comments, though I do try to make variable and function names obvious which I think helps a little.
        Discussing it here is probably best, means other people can find the answers too <:-)

        P.S. - English is my native language, but still expect errors <:-)

         
    • miguel

      miguel - 2003-08-29

      One more question.

      I never worked with allegro, so I should see that some of my questions are really basics.

      How can I extract the BMP's from a DAT file to a BMP??
      And vice-versa??

      I'm planning to make a different front menu.

       
    • darthyoda6

      darthyoda6 - 2004-03-26

      I've compilled Allegro no problem, but I keep getting this error and I don't know how to tell it where the allegro.h is located.

      make -C src
      make[1]: Entering directory `C:/atanks/src'
      g++ -c globaldata.cc -o globaldata.o -DWIN32 -DVERSION=\&quot;1.1.0\&quot; -DDATA_DIR=\&quot;.\ "   -Wall -Iinclude  -g
      In file included from player.h:21,
                       from globaldata.cc:21:
      main.h:24:21: allegro.h: No such file or directory
      main.h:26:1: warning: "VERSION" redefined
      globaldata.cc:1:1: warning: this is the location of the previous definition
      main.h:27:22: winalleg.h: No such file or directory
      main.h:36:20: iostream: No such file or directory
      main.h:42:18: string: No such file or directory
      In file included from player.h:21,
                       from globaldata.cc:21:
      main.h:131: 'RGB' is used as a type, but is not defined as a type.
      main.h:269: syntax error before `*' token
      main.h:272: syntax error before `*' token
      main.h:273: syntax error before `*' token
      main.h:274: syntax error before `*' token
      main.h:275: syntax error before `*' token
      main.h:276: syntax error before `*' token
      main.h:277: syntax error before `*' token
      main.h:278: syntax error before `*' token
      main.h:279: syntax error before `*' token
      main.h:280: syntax error before `*' token
      main.h:281: syntax error before `*' token
      main.h:282: syntax error before `*' token
      main.h:283: syntax error before `*' token
      main.h:290: type specifier omitted for parameter `BITMAP'
      main.h:290: parse error before `*' token
      main.h:298: type specifier omitted for parameter `BITMAP'
      main.h:298: parse error before `*' token
      main.h:299: type specifier omitted for parameter `BITMAP'
      main.h:299: parse error before `*' token
      main.h:308: type specifier omitted for parameter `BITMAP'
      main.h:308: parse error before `*' token
      In file included from globaldata.cc:22:
      globaldata.h:63: syntax error before `*' token
      globaldata.cc: In member function `void GLOBALDATA::addPlayer(PLAYER*)':
      globaldata.cc:216: `FALSE' undeclared (first use this function)
      globaldata.cc:216: (Each undeclared identifier is reported only once for each
         function it appears in.)
      globaldata.cc: In member function `void GLOBALDATA::removePlayer(PLAYER*)':
      globaldata.cc:231: `TRUE' undeclared (first use this function)
      make[1]: *** [globaldata.o] Error 1
      make[1]: Leaving directory `C:/atanks/src'
      make: *** [all] Error 2

       
  • Anonymous - 2012-07-02

    Could you please provide new instructions how to build ATanks under windows using latest source, mingw and allegro?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks