How to compile CLIVAN challenge

Oct 1, 2013, 11:53 am
#1
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Here are some instructions on how to compile for example, Continuation of Lampshade's Iter Vehemens ad Necem.

You will need:
MinGW 3.4.2
CLIVAN source
Programmer's Notepad

Try with a later version of MinGW to see if it works. It probably won't, so don't try this.
Once you have installed all three, open Programmer's Notepad, open Tools->Options. On the left is a menu, click on Tools.
Add the following as per the screenshots in the attachment.

Press F9...

Let me know how you get on. Get stuck? Maybe I can help...
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 12, 2014, 5:57 pm
#2
Joined: Feb 20, 2012
Posts: 231
I've been trying to compile the source from Github as per these settings, but it only results in a slew of compiler errors (as seen in the attached .txt).

MinGW (at least v3.4.2) doesn't seem to actually include mingw32-make.exe, which I had to find elsewhere; this could likely cause problems.
Attached files
ierr.txt ()
Mar 12, 2014, 6:36 pm
#3
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
That's strange. So you got a MinGW 3.4.2 with no mingw32-make.exe?
Compiling is tricky, but to make progress you just work through the errors until they go away.
For starters, from the errors it seems like the compiler can't find things like math.h or stdio.h. Maybe check whether these are in the file because they're part of the standard library. See if you can get that machinery going and then see what errors come up next.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 12, 2014, 6:54 pm
#4
Joined: Feb 20, 2012
Posts: 231
Alright, for some reason that download of MinGW was wonky; I fixed that up (with a newer version however; where did you get the 3.4.2 you use?), and after grabbing SDL, I get this:
Compiling IVAN.exe...
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x3f4): undefined reference to `__chkstk_ms'
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x66f): undefined reference to `__chkstk_ms'
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0xa94): undefined reference to `__chkstk_ms'
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x13df): undefined reference to `__chkstk_ms'
\mingw\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: /mingw/lib/libmingwex.a(pformat.o): bad reloc address 0x34 in section `.rdata'
\mingw\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status
C:\MinGW\bin\mingw32-make.exe: *** [IVAN.exe] Error 1
Mar 12, 2014, 7:11 pm
#5
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Curiouser and curiouser.
Is it related to: this discussion item on stackoverflow?

Type
>gcc -v
in the command line.

Keep perservering, we're almost there. It's probably something getting mucked up with library versions or something.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 12, 2014, 8:22 pm
#6
Joined: Feb 20, 2012
Posts: 231
I reinstalled MinGW (4.8.1) and removed old versions, now I get an error here:

C:\ivan\FeLib/Include/save.h:395:19: note:   template argument deduction/substitution failed:
C:\ivan\FeLib/Include/save.h:262:14: note:   mismatched types 'fearray<type>' and 'long long int'
     SaveFile >> Vector[c];
              ^

C:\ivan\ivanmgw.mak:27: recipe for target 'C:\ivan\FeLib/Source/hscore.o' failed

mingw32-make: *** [C:\ivan\FeLib/Source/hscore.o] Error 1
Mar 12, 2014, 10:11 pm
#7
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
It looks as if it is starting to compile. Is the compiler building object files?
The error is a plain old bug. It looks complicated because fearray belongs to FeLib, which the devs wrote. They basically created a bevy of new data types to accomodate what they wanted to achieve. I don't know whether they wrote this concurrently with IVAN or before. I think newer compilers have a problem with that situation.

Maybe fiddle around with the warning levels on the compiler. Is it a warning or a downright error? Probably won't tell us anything new.

I have a grave fear that we may need to use an antiquated compiler...

Here's the link to the old forum on how to compile.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 12, 2014, 11:30 pm
#8
Joined: Feb 20, 2012
Posts: 231

Thanks, I'll take a look at it tomorrow and report back on my progress.

UPDATE: I attached a .txt with the problematic area again. It seems to be having some trouble with the << and >> operators in this section of FeLib\Include\save.h

template <class type>
inline outputfile& operator<<(outputfile& SaveFile,
			      const std::vector<type>& Vector)
{
  SaveFile << ulong(Vector.size());

  for(ulong c = 0; c < Vector.size(); ++c)
    SaveFile << Vector[c]; // error: ambiguous overload for 'operator<<' (operand types are 'outputfile' and 'const long long int')

  return SaveFile;
}

template <class type>
inline inputfile& operator>>(inputfile& SaveFile,
			     std::vector<type>& Vector)
{
  Vector.resize(ReadType<ulong>(SaveFile), type());

  for(ulong c = 0; c < Vector.size(); ++c)
    SaveFile >> Vector[c]; //error: no match for 'operator>>' (operand types are 'inputfile' and 'long long int')

  return SaveFile;
}
Attached files
ierr.txt ()
Mar 13, 2014, 4:13 am
#9
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Have a go at rolling back the changes I made to some of the source files. Just put the semicolons back where they were. Maybe it helps maybe it doesn't.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 13, 2014, 3:03 pm
#10
Joined: Feb 20, 2012
Posts: 231
The semicolons just give warnings, but don't seem to affect anything... I can't seem to get it compile past hscore.o
Mar 16, 2014, 6:19 pm
#11
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Try using an older compiler. In the link to MinGW 3.4.2, you'll need the gcc core and g++ compiler.
If you run into more problems, I could zip my distribution and send it to you, just pm me an address.
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Mar 16, 2014, 8:07 pm
#12
Joined: Feb 20, 2012
Posts: 231
I used that link, but that gave me the initial problems. I'll pm you

EDIT: Thanks, it worked!
Jump to