Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > COMPILE: Getting the source to compile
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread   
Pages (8): [ 1   2   3   4   5   6     >> ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 21:07 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#61 Report this post to a moderator
Full PM-box? Change here!

quote:
Originally posted by DDowell
I also fiddled around with the warnings a bit. But my target was to remove them altogether in order to get to the errors fasters

Have you checked the project settings carefully? Any /WX must be replaced/removed (exchange X for 0,1,2,3.. depending on warning level).


Yep, I even searched the project file for the string "/W4" and there weren't any occurances. There were plenty of /W3, as expected...

quote:
You say you cant get around it by replacing the .dsw? That's strange.


It's beyond strange, it seems totally impossible - either it is passing a compiler option that isn't specified anywhere, or the compiler is doing things that it shouldn't, or I am going totally insane. I don't know which of these is worse... I was hoping it was some kind of well known bug with Visual Studio, but it doesn't seem to be...

Last edited by J Bytheway on 31-10-2003 at 21:28

Mr Ogre is offline Mr Ogre
Warlord
Azeroth
Jan 1970
time: 05:31
  Old Post 31-10-2003 21:28 Visit Mr Ogre's homepage!
Edit/Delete Message Reply w/Quote
#62 Report this post to a moderator
Increase Your PM Length

UNITS and MILLISECONDS are defined in DXMedia/Classes/base/reftime.h. If you are getting those errors, you probably don't have DXMedia set up properly. Make sure you do it exactly like I said in my last post.

I suspect your link errors are a related problem, those look like DXMedia or DirectX functions to me.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 31-10-2003 21:52 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#63 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by DDowell
Well, I fix that problem (UNITS/MILLISECONDS) but
now I get a link error.

code:
display.obj : error LNK2001: unresolved external symbol _xGetSystemMetrics@4 display.obj : error LNK2001: unresolved external symbol _xGetMonitorInfo@8


Any suggestions to why the linking fails?

GetSystemMetrics are defined "in" winuser.h which is included in windows.h


When I get these errors, in particular errors containing LNK2001, then I use the delete command of all files that were privously compiled. It happens often when I compile and compile again a project with little changes in between. Maybe there is a better way of doing it especially if you consider the size of the project. The option that does deletion for you should be found in the menue beside the Project menue entry, maybe it is called in the English version Compiling or something like this and it is the fifth entry of that sub menue in the German version it is called Bereinigen and I didn't find a good translation for it maybe delete.

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 22:29 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#64 Report this post to a moderator
Support Apolyton or Terrorists Win

Hmm... I seem to have recovered from the warning level problem by installing a fresh version of the CTP2 source. I hope that I never see the problem again...

It will take me a while to repeat my previous progress now, though.

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 22:30
Edit/Delete Message Reply w/Quote
#65 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by Martin Gühmann
...Compiling or something like this and it is the fifth entry of that sub menue in the German version it is called Bereinigen and I didn't find a good translation for it maybe delete.
-Martin


It is called 'clean'. Unfortunately, it doesn't help.

In regard to Mr. Ogre's comment, this is what my project settings look like:

code:
Include: G:\PROGRAM\DXSDK\INCLUDE G:\PROGRAM\DXMEDIASDK\INCLUDE G:\PROGRAM\DXMEDIASDK\CLASSES\BASE g:\Program\Microsoft\Visual Studio\VC98\INCLUDE g:\Program\Microsoft\Visual Studio\VC98\MFC\INCLUDE g:\Program\Microsoft\Visual Studio\VC98\ATL\INCLUDE Library: G:\PROGRAM\DXSDK\LIB G:\PROGRAM\DXMEDIASDK\LIB g:\Program\Microsoft\Visual Studio\VC98\LIB g:\Program\Microsoft\Visual Studio\VC98\MFC\LIB


The library order doesn't seem to matter as far as the link is concerned.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 22:34 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#66 Report this post to a moderator
Tired of ads?

Did you copy the libraries from the DX and DXMedia directories into the CTP2 source directory?

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 22:36
Edit/Delete Message Reply w/Quote
#67 Report this post to a moderator
Suffering from ads?

Finally!!!! It compiles!

Seems like my linking problem was due to the inclusion of multimon.h in display.h instead of in display.cpp.
After I included it in display.cpp (and display.h) the linking went fine!

(Does this imply that display.h is not defined properly?)

centrifuge is offline centrifuge
Prince
USA
Apr 2002
time: 22:31
  Old Post 31-10-2003 23:03
Edit/Delete Message Reply w/Quote
#68 Report this post to a moderator
Full PM-box? Change here!

quote:
Originally posted by DDowell
Finally!!!! It compiles!


That a boy!!!

This is good news, certainly there is work to be done, but it so awesome watching the progress that you guys are making.

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 31-10-2003 23:31 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#69 Report this post to a moderator
Suffering from ads?

So, feel like posting a revised list of stuff to be done to make the thing compile?

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 31-10-2003 23:38 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#70 Report this post to a moderator
Suffering from ads?

quote:
So, feel like posting a revised list of stuff to be done to make the thing compile?


See Mr Ogre's post. That worked for me.


Quite odd to see DDowell had so many other problems, I didn't have any of those (and from the looks of it, neither had John or Mr Ogre). Maybe that has something to do with some DevStudio 6 settings or something?

Edit: nm, I overlooked one of Mr Ogre's posts. Makes sense if those are a DirectX setup problem on DDowell's behalf...

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 31-10-2003 23:42 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#71 Report this post to a moderator
Support Apolyton

I am still getting weird file missing errors. I am missing some source files, which are no longer there. And weren't even when I reinstalled the source. WTF.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 01-11-2003 00:02 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#72 Report this post to a moderator
Increase Your PM Length

Can you post them? (The errors, not the files, obviously )

ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:31
  Old Post 01-11-2003 00:10
Edit/Delete Message Reply w/Quote
#73 Report this post to a moderator
Get a bigger avatar today!

quote:
Originally posted by Locutus
Can you post them? (The errors, not the files, obviously )


missing ctpdbg.h

Looked, couldn't find it, just ignored it while I worked on other errors, and then went to bed. Any ideas?

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 01-11-2003 00:15 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#74 Report this post to a moderator
Remove this text

The file y.tab.c was missing for me. Oddly, now, though, it's not.

I have installed a fresh copy of source again, and am currently compiling it after having followed Joe's instruction. The files aren't showing up as missing.

Then, though they did... and they weren't in the folders, really.

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 01-11-2003 00:15
Edit/Delete Message Reply w/Quote
#75 Report this post to a moderator
Support Apolyton or Terrorists Win

Oh, goody!

It compiles but now I get a lot of Assertion errors!
The ones in MapPoint.cpp is strange but can be commented out, the trouble is when I exit the game. It spawns hundreds of assertion failures!

Of course, I can still compile and play the game so it isn't all bad

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 01-11-2003 00:16 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#76 Report this post to a moderator
Browse Apolyton AD-FREE

Missing source files may be things which were suposed to be generated by byacc or flex. Ensure that you have successfully compiled everything else before you worry about the main ctp2 project itself.

I have now successgully compiled and linked (Hooray! ), I even discovered why the byacc/flex commands hadn't been working before (a little typo in my definition of CDKDIR...).

I think the trick was to start again, and also have DXMedia copied into the libs directory. I think the last version I was using had accumulated problems due to me rearranging things so much.

However, when I run the executable, I just get a blank screen...

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:31
  Old Post 01-11-2003 00:37 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#77 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

what about the stuff form ctp pics etc

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 01-11-2003 00:54 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#78 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
However, when I run the executable, I just get a blank screen...


That's the last thing I got as well this morning. But I also got a database error (some txt file missing, probably because my directory structure is messed up by the mods). I had to leave for work then, so couldn't test further, but I'm guess installing a clean copy of the data folder from the CD might solve that, at least for me...

Fromafar is offline Fromafar
Prince

May 2003
time: 06:31
  Old Post 01-11-2003 01:35
Edit/Delete Message Reply w/Quote
#79 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

The black screen may be caused because you are running the debug version. The release and final versions work for me.

However, it took some extra work to build those, because the production rules for most of the lex and yacc files were missing in the projects. You have to right-click on the individual files, select Settings, go to the Custom Build tab, and copy the Commands and Output fields from the debug version. Here is the list of files to check:

ctp2\gs\slic\slic.l
ctp2\gs\slic\slic.y
ctp2\gs\slic\sliccmd.l
ctp2\gs\slic\sliccmd.y
ctp2\gs\newdb\DBlexer.l
ctp2\ui\ldl\ldl.l
ctp2\ui\ldl\ldl.y
dbgen\ctpdb.l
dbgen\ctpdb.y

And, of course, you have to apply the modifications to the final Link step - e.g. removal of the Miles library -
again for each project.

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 01-11-2003 02:24 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#80 Report this post to a moderator
Tired of ads?

I have succesfully compiled the debug version to the point where I can get a blank screen.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 01-11-2003 02:51 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#81 Report this post to a moderator
Get a bigger avatar today!

Fromafar,

Strange, I didn't have to do that. The release version built just fine for me (that's actually the one I was referring to in my last post) Then again, I didn't have time to run it properlyl yet, so I might have screwed up something, I'll test it in a few minutes...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 01-11-2003 03:01 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#82 Report this post to a moderator
Increase the size of your Attachments

I have successfully run the release version. I didn't have to alster the custom build settings for the yacc/lex files since they have already been built, and the IDE didn't bother to build them again.

The first thing I noticed was a great many SLIC errors in the SAP SLIC files (several of the functions used therein were not recognised, like ArmyIsValid), so I switched back to the original game.

The only other problem I had was that the game refused to recognise my CD (although it did manage to read the intro movie from it) and so I had to remove the CD check. I guess this is because my copy of the CD is scratched to the point where the verification fails (it seems to be checking the track lengths).

I used the /rnd command to play through about 100 turns without notable problems, but when I quit I got an error (probably related to those assertion errors DDowell was getting, but because my build is not a debug build it just appears as a general error).

mjs0 is offline mjs0
Settler
Florida, USA
Jun 2001
time: 00:31
  Old Post 01-11-2003 03:46
Edit/Delete Message Reply w/Quote
#83 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by Solver
I have succesfully compiled the debug version to the point where I can get a blank screen.


I have the debug version working under VS.NET...one thing to note is that it spends a Looooong time initializing when running the debug build.
My machine is 2.6Ghz but it still took many minutes to get past the initialization and display more than the blank screen.

Martin.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 01-11-2003 03:49 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#84 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by J Bytheway
The only other problem I had was that the game refused to recognise my CD (although it did manage to read the intro movie from it) and so I had to remove the CD check. I guess this is because my copy of the CD is scratched to the point where the verification fails (it seems to be checking the track lengths).


Once I had this problem with the original game, a restart of my computer helped.

So far I am down to one error after a successless installion of DIrectX 9 and a successfull DirectX 8 installation, I have this problem:

code:
Kompilieren... lex.sc.c lex.yy.c fatal error C1083: Quelle-Datei kann nicht geoeffnet werden: 'C:\Activision\Ctp2\ctp2_code\gs\slic\lex.yy.c': No such file or directory


it looks like the lex.yy.c is build successfully, but it claims there is no such file in the slic directory, and I can't find it there. I find a version of it in the C:\Activision\CTP2\ctp2_code\gs\dbgen folder but I doubt it is the right version so how can I build it manually?

-Martin

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 01-11-2003 03:50 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#85 Report this post to a moderator
Increase the size of your Attachments

I failed the CD check on the Final version as well, and my CD is in pretty good condition as far as I can tell. Intro movie played fine for me as well.

I guess this is the first thing we'll have to fix if we want to release any patches, 'cause without a CD check the EULA would be violated...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 01-11-2003 04:00 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#86 Report this post to a moderator
Put an end to popups!

quote:
Originally posted by Martin Gühmann
Once I had this problem with the original game, a restart of my computer helped.


I'll try that.

quote:
So far I am down to one error after a successless installion of DIrectX 9 and a successfull DirectX 8 installation, I have this problem:

code:
Kompilieren... lex.sc.c lex.yy.c fatal error C1083: Quelle-Datei kann nicht geoeffnet werden: 'C:\Activision\Ctp2\ctp2_code\gs\slic\lex.yy.c': No such file or directory


it looks like the lex.yy.c is build successfully, but it claims there is no such file in the slic directory, and I can't find it there. I find a version of it in the C:\Activision\CTP2\ctp2_code\gs\dbgen folder but I doubt it is the right version so how can I build it manually?


Those two files come from the flexing of sliccmd.l and slic.l respectively - see the custom build settings for these two files.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 01-11-2003 04:02 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#87 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Costum build setting where can I find this option, John?

Currently I am trying to compile the Release version instead of the debug version.

-Martin

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 01-11-2003 04:07 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#88 Report this post to a moderator
Get a bigger avatar today!

I tried rebooting, nogo.

I seem to have a bit of another problem though. On the Release and Debug builds, the game crashes to desktop as soon as the a new game is done loading.

On the Debug build I get this:

quote:
Debug Assertion Failed!

Program: D:\Games\Activision\source\ctp2_code\CivCTP_dbg.exe
File: D:\Games\Activision\source\ctp2_code\gs\fileio\Gam
eFile.cpp
Line: 2093

Expression: g_soundManager != NULL


I guess I must have outcommented a bit too much

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 01-11-2003 04:15 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#89 Report this post to a moderator
Increase Your PM Length

quote:
one thing to note is that it spends a Looooong time initializing when running the debug build.


I didn't have this problem (with VS6) at all. It loaded just as quickly as the other builds for me...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 01-11-2003 04:17 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#90 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

quote:
Originally posted by mjs0
I have the debug version working under VS.NET...one thing to note is that it spends a Looooong time initializing when running the debug build.
My machine is 2.6Ghz but it still took many minutes to get past the initialization and display more than the blank screen.


Patience is indeed required. It took ~7 minutes on my machine, but then you do get a bunch of debugging messages printed to the screen.

I got a couple of assertion errors in GameFile.cpp line 2093 where the non-NULLity of the sound manager is asserted, so I commented that one out, and then another (possibly the first of many) as I quit. Curiously, at the same time Control Panel popped up an error, but I think the two were unrelated.

 
Pages (8): [ 1   2   3   4   5   6     >> ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:31.
Apolyton Time is 00:31.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0578 seconds (90.10% PHP - 9.90% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net