The Dink Network

Having Trouble Compiling Dink.exe (1.08)

Dink Smallwood 1.08 Source Code

September 9th 2009, 02:39 PM
knights.gif
Androrc
Peasant He/Him Austria
 
I have been trying to compile Dink.exe (version 1.08), but to no avail. I tried a few things and it keeps giving me errors and ending up not compiling. I am using CodeBlocks and tried to compile Dink through both Visual Toolkit 2003 and Visual C++ 2005/2008 compilers, and it still didn't work.

What compiler should I use, and with which parameters? Should I use another program instead of CodeBlocks to compile?
September 9th 2009, 10:01 PM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
I'm moving this to Dink Smallwood 1.08 Source, since I think that's what you're talking about.
September 10th 2009, 03:44 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
I don't know why you'd try in anything else other than VS2005 or later. You might (Large Hint) also want to copy your error log output so we can read it...
Also why are you trying to compile it when you can download it for free?
September 10th 2009, 04:36 AM
knights.gif
Androrc
Peasant He/Him Austria
 
I don't seem to have Visual Studio. Kk, I'll copy the error log here.

EDIT: When trying to compile with Microsoft Visual C++ Toolkit 2003 I get this:
Execution of 'rc.exe /I..\common -foDebug\common\dink.res ..\common\dink.rc' in 'C:\Program Files\Dink Smallwood\source\Dink' failed.

And with Microsoft Visual C++ 2005/2008 (too many errors, so I'll put them in a text file):

http://dl.getdropbox.com/u/1732902/dinkcompilelog2.txt

As for why I'm trying to compile it, I just want to mess around with the source a bit.
September 10th 2009, 09:43 PM
anon.gif
Toast
Ghost They/Them
 
Sorry to break it to you man, but that text file is blank when I open it.
September 10th 2009, 11:21 PM
burntree.gif
Fireball5
Peasant He/Him Australia
Let me heat that up for you... 
When I viewed source (don't exactly know why I did) it had barebones HTML, isn't it supposed to be a text file? Although I did see <pre> tags, if the text was supposed to go there.
September 11th 2009, 06:10 AM
knights.gif
Androrc
Peasant He/Him Austria
 
Fixed that, there it is:

http://dl.getdropbox.com/u/1732902/dinkcompilelog2.txt
September 15th 2009, 02:37 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
LOOK UPON MY DEFORMED FACE! 
Sounds like you've done something wrong. As i'm not a programmer really I don't know much, you'll need to check that the necessary libraries are in your path (Direct X SDK and whatever else is listed). If Merlin is around he might know.

But basically open the .sln file in VS2005 and click compile. Don't screw around with command line tools if you don't know what you're doing. I think the Direct X 8 SDK comes with VS2005 which would be sufficient for you to compile. If you don't have vs2005, i'll PM you a link where you can get it.
September 16th 2009, 05:50 AM
anon.gif
Toasty
Ghost They/Them
 
Scratch that, I can't find a DL link for VS2005. You could probably try Visual C++ Express, which may open the sln file. Otherwise go to Freedink.org and download Freedink which is apparently a lot cleaner (therefore more easy to tinker with) and more portable (Uses SDL which is platform independent.) Freedink will compile in CodeBlocks no problems as far as i would guess as long as you have the required deps.
November 17th 2010, 02:47 PM
pig.gif
jayon
Peasant They/Them Brazil
There should be pigs flying... 
This is just in case anyone tries to compile in the future to learn and gets those errors...

Don't worry about the warnings, it will still compile. You'll get a ton of strcpy, sprintf, and fopen is deprecated warnings. Don't worry about those for now, unless you feel like changing each one to strcpy_s (not to mention the others) and adding an extrafield which is the size of the string. Either way, the new functions are better, but will take a lot of work to get them implemented. It might be better to use a String class or something instead.

The "default-int" warnings are because they are set to "const" and the "int" was understood at the time. After all of those enter "const int" where "const" is. Don't do a "replace all" because there are a few that are "const char" and one other that is correct and will break if you use "replace all"...

After you correct all of those errors, the next ones are for loops that have the int in the wrong scope so it creates a ton of other errors. look for the next error and the first warning before it, and it should be something about "k" being a pic_info. That should really be an int. Go to the next for loop up and take "int k" and replace it with just "k" and right above the for loop put "int k;" so that it's scope will cover the next for loop. I would say to just put "int k" in the next for loop, but it's used again, so don't do that.

You will have to do this in the functions kill_all_scripts, kill_all_scripts_for_real, load_script, kill_returning_stuff (it's an "i" in this one), playbank (i), and process_item (i).

Actually if you just go to each of those functions to the first for loop and pull the integer initialization that might save you the time of finding the for loops.

-- And that's it. Compile with the warnings (it should ignore them and build anyway, but if you have to change a setting do so) and it should work fine. To get it to run after you have the executable, you will have to load a mod first though...
November 17th 2010, 02:52 PM
pig.gif
jayon
Peasant They/Them Brazil
There should be pigs flying... 
oh, just to clarify the for loop thing, you will see the following in the functions I mentioned (sometimes it's "k" instead of "i" or something):

for (int i=0;i<MAXSOMETHING;i++)

or something similar, what you should do is take the integer out like this:

int i;
for (i=0;i<MAXSOMETHING;i++)