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     >> ]
< 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 29-10-2003 06:18 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Getting the source to compile Support Apolyton, buy Galactic Civilizations

OK, I've had some success getting the source to compile. Here's a quick summary of what I had to do:

Firstly, download both the DirectX things as mentioned in the readme, and set up the VC++ paths as mentioned.

Set up the environment variable as instructed in the readme, and then reboot (Otherwise the change will not be noticed).

I worked with the workspace ctp2_code\ctp\civctp.dsw in MSDev (That is the MS Visual C++ IDE) from MS Visual Studio 6.0.

The next thing that went wrong was that none of the custom build instructions using flex or byacc worked, so I had to copy/paste out the command lines and do them myself at a command prompt (You can find the command lines it is trying to run by right-clicking on the file it's trying to build, choosing "Settings..." and going to the "Custom Build" tab).

After that, the lack of miles sound system is the next problem. This is referenced in civsound.h, and I think the best solution is to rewrite the CivSound class with stub methods. I haven't got the time to do that, because I have to get to bed, but I'll try to find some more time tomorrow.

Any other suggestions are welcome.

Last edited by J Bytheway on 29-10-2003 at 06:26

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:31
  Old Post 29-10-2003 08:05 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton or Terrorists Win

To supplement John's post, here's what you need to get the file to compile (up until the point where you get Miles Sound System errors):

1) Download and extract the sourcecode. Get it here: http://apolyton.net/ctp2/files/CTP2_Source.exe (8 MB)

2) Download the two required DirectX SDKs.
The first one is here: http://www.microsoft.com/downloads/...&displaylang=en (186 MB)
The second one is here: http://www.microsoft.com/downloads/...4C-E7D710E18522 (92 MB)

3) Set up the environment variable (CDKDIR). See readme (Control Panel->System->Environment Variables). Then reboot.

4) Open the project file of the source code(ctp2_code\ctp\civctp.dsw) in Microsoft Visual Studio 6. Other compilers may work as well, but this is untested.

5) Make sure you add the Include and Lib and classes/base directories from the DirectX SDKs to Tools->Options->Directories from Visual Studio, as described in the readme.

6) Build the flex and byacc files manually, as described by John.

7) Compile the code. Should give 101 errors and 5 warnings. This is the point where CivSound needs to be replaced by a stub (empty code).

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:31
  Old Post 29-10-2003 08:54
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Or, if you're on a crappy modem connection on a crappy ISP and only need the actual DirectX 7 C++ build files (without samples, help etc) then you can download the minimal version of 400kb (instead of 186meg) from here.....

http://alleg.sourceforge.net/files/dx70_min.zip

RalphTrickey is offline RalphTrickey
Settler
Colorado Springs
Oct 2001
time: 22:31
  Old Post 29-10-2003 09:31
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton buy from Amazon

.Net is more interesting...

I found the following...

1) The Flex and Bison build commands
a) Don't like embedded spaces
b) the "s are in the wrong spaces.

You need to install to a path without embedded spaces, and look closely at where the "s are. Some need to be removed or moved.

2) replace references to the include file List-fixed with references to List.

3) there's a new keyword called typename, required for the templates.

4) Scheduler has some redundency issues. It look like moving s_Schedulers into the .cpp file resolves this.

5) Many math functions now cause redundancy errors. At least one of these looks like it hid a bug
Taking the (Ceil of an Int/Int will always do a floor instead)

6) It looks like the custom allocation for the STL has changed slightly.

Ralph

ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:31
  Old Post 29-10-2003 09:48
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by RalphTrickey
.Net is more interesting...

I found the following...

1) The Flex and Bison build commands
a) Don't like embedded spaces
b) the "s are in the wrong spaces.

You need to install to a path without embedded spaces, and look closely at where the "s are. Some need to be removed or moved.

2) replace references to the include file List-fixed with references to List.

3) there's a new keyword called typename, required for the templates.

4) Scheduler has some redundency issues. It look like moving s_Schedulers into the .cpp file resolves this.

5) Many math functions now cause redundancy errors. At least one of these looks like it hid a bug
Taking the (Ceil of an Int/Int will always do a floor instead)

6) It looks like the custom allocation for the STL has changed slightly.

Ralph


Do I sense two variants of Open Source CTP2 arising already?

vovan is offline vovan
Emperor

Oct 2001
time: 06:31
  Old Post 29-10-2003 10:14
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton, buy Call to Power 2

Something I found out is that the custom build steps don't like spaces in your path, like RalphTrickey said. I had the following error when building: "C:/Documents" not found. Or something along these lines. The solution was to copy the bison and yacc files into a folder with no spaces, like "C:\cdk_dir" and put that into the CDKDIR environment variable.

The next problem was that my sources were also in a path with spaces in it. And sure enough yacc didn't like it... And sure enough, into a directory with no spaces the source went. That's a bit of copying around, but hey, I didn't have to do the yacc and bison stuff manually.

EDIT: Update: All of the projects except for ctp2 compiled cleanly. As for the ctp2 one... Heh... It's going... But I've seen so many errors, it's not even funny, I'll update with the number, when it comes up.

Update2: The thing's finally done with the first run of compilation... I could only dream of 101 Errors. 732 Errors and 1264 warnings here. Most are in ctp2_code/ai/list-fixed.... Guess I'll just include the list header I have on my machine for now and see what happens. Any way, like RalphTrickey said, it's definitely a little more complicated on VS.NET, which is also what I have. I'll post a detailed list of what needs to be done when I get down to 101 errors.

Last edited by vovan on 29-10-2003 at 10:48

vovan is offline vovan
Emperor

Oct 2001
time: 06:31
  Old Post 29-10-2003 11:00
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton, buy Civilization 2

Okay, the problem I have now, is somehow the STL doesn't want to play.... I get a lot of errors like this:

c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\deque(59): error C2027: use of undefined type 'Scheduler'

Though you'd think it should work, somehow it doesn't. This is beyond me, at least at one o'clock in the morning, so I'm going to bed. If anyone has any ideas as to why I might be having problems with STL, feel free to point out.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 13:28 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton buy from Amazon

Hmm... I was careful to install to a path without spaces, so that couldn't ve the source of my flex/bison problems...

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

This is one great thread. I will now try to get the souce at least to the 101 error point at this computer.

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 29-10-2003 18:43
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Tired of ads?

How do I solve this?

--------------------Configuration: ctp2 - Win32 Debug Browse--------------------
Performing Custom Build Step on ..\ui\ldl\ldl.y
k:\Activision\CTP2Source\bin\byacc: f - cannot open "/tmp/yacc.aa01116"
Error executing c:\windows\system32\cmd.exe.

CivCTP_dbg.exe - 1 error(s), 0 warning(s)

Last edited by DDowell on 29-10-2003 at 20:05

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

DDowell,
Sounds like the Custom Build Steps problem John described. Did you try compiling manually?

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

Does anyone know what the difference is between a "Debug" build and a "Debug Browse" build - I was doing the former but I see that DDowell was doing the latter...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 19:01 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Increase Your PM Length

quote:
Originally posted by RalphTrickey
.Net is more interesting...

I found the following...

1) The Flex and Bison build commands
a) Don't like embedded spaces
b) the "s are in the wrong spaces.


What do you mean by the latter - there aren't any "s in the Flex and Bison build commands, are there? They look something like:

code:
$(CDKDIR)\flex -i -o$(ProjDir)\lex.yy.c $(InputPath)

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 19:13 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

quote:
Originally posted by ahenobarb
Do I sense two variants of Open Source CTP2 arising already?


Hopefully we can use #ifdefs to make a version which will compile under both conditions (not to mention gcc, too, but that will probably take rather longer)

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 19:18 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Increase Your PM Length

I'm chainposting again, but I can't help it...

One of the things in the CivSound class is

code:
HAUDIO m_hAudio;


Now, the HAUDIO type was defined in mss.h (or one of its dependancies) so if I want to nullify the methods of CivSound without altering it too much I need to redefine it as something else which is recognized. Should I just use uint32, or does someone else have a better idea? The size of the type might matter, but hopefully it won't...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 19:33 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

I have a new record - only 109 errors

Edit: my mistake, I thought it was 110 before, not 101...

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

quote:
Hopefully we can use #ifdefs to make a version which will compile under both conditions (not to mention gcc, too, but that will probably take rather longer)


Check out the makefile and/or project workspace source. There are about 8 different versions you can create with Visual Studio alone: debug, test, final_test, release, etc...


As for HAUDIO, I think uint should work for most undefined stuff... fortunately C++ is not too picky when it comes to type-checking...

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 19:49 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Now I'm down to just 11 errors/12 warnings. Some are in display.h/.cpp, which are presumably due to non-backwards compatibility of DirectX 9.0b to 7.0a, and others have to do with the list include file (#include ), and I have no idea about those at all, but I guess it's related to what RalphTrickey was saying above.

Anyway, here are the changes I have made to the CivSound class to get this far:

In civsound.h replace the #include "mss.h" with:

code:
// JJB MSS removal // #include "mss.h" // and redefine HAUDIO, HREDBOOK, which were // presumably defined in mss.h: #define HAUDIO uint32 #define HREDBOOK uint32

and in CivSound.cpp, replace the constructor with:
code:
CivSound::CivSound(uint32 associatedObject, sint32 soundID) { const char *fname; // JJB altered so that always fname == NULL // and then m_hAudio never needs to be initialized //if(soundID < 0) fname = NULL; //else // fname = g_theSoundDB->Get(soundID)->GetValue(); m_associatedObject = associatedObject; m_soundID = soundID; m_isPlaying = FALSE; m_isLooping = FALSE; m_hAudio = NULL; if (fname == NULL) { m_soundFilename[0] = 0; m_dataptr = NULL; m_datasize = 0; return; } // JJB cut out these lines which now never run //strcpy(m_soundFilename, fname); //m_dataptr = g_SoundPF->getData(m_soundFilename, &m_datasize); //m_hAudio = AIL_quick_load_mem(m_dataptr, m_datasize); }

(The indentation is a little messed up due to my using tab length 4 in VC++)

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 20:06 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Increase Your PM Length

Here are some of those display errors:

code:
Compiling... display.cpp c:\games\ctp2src\ctp2_code\ctp\display.h(11) : error C2146: syntax error : missing ';' before identifier 'hMon' c:\games\ctp2src\ctp2_code\ctp\display.h(11) : error C2501: 'HMONITOR' : missing storage-class or type specifiers c:\games\ctp2src\ctp2_code\ctp\display.h(11) : error C2501: 'hMon' : missing storage-class or type specifiers c:\games\ctp2src\ctp2_code\ctp\display.h(25) : error C2061: syntax error : identifier 'HMONITOR' c:\games\ctp2src\ctp2_code\ctp\display.cpp(55) : error C2039: 'hMon' : is not a member of 'DisplayDevice' c:\games\ctp2src\ctp2_code\ctp\display.h(6) : see declaration of 'DisplayDevice' c:\games\ctp2src\ctp2_code\ctp\display.cpp(68) : error C2065: 'LPDIRECTDRAWENUMERATEEX' : undeclared identifier c:\games\ctp2src\ctp2_code\ctp\display.cpp(68) : error C2146: syntax error : missing ';' before identifier 'pfnEnum' c:\games\ctp2src\ctp2_code\ctp\display.cpp(68) : error C2065: 'pfnEnum' : undeclared identifier c:\games\ctp2src\ctp2_code\ctp\display.cpp(77) : error C2146: syntax error : missing ';' before identifier 'GetProcAddress' c:\games\ctp2src\ctp2_code\ctp\display.cpp(84) : error C2100: illegal indirection c:\games\ctp2src\ctp2_code\ctp\display.cpp(268) : error C2039: 'hMon' : is not a member of 'DisplayDevice' c:\games\ctp2src\ctp2_code\ctp\display.h(6) : see declaration of 'DisplayDevice'

Which seems to mostly be due to an undeclared HMONITOR.

And here are some of the list-related errors (well, technically they are warnings, not errors. In any case they are rather more difficult to decipher):
code:
WldGen.cpp c:\program files\microsoft visual studio\vc98\include\list(178) : warning C4786: '?rbegin@?$list@PAVTransport@NETFunc@@V?$allocator@PAVTransport@NETFunc@@@std@@@std@@QBE?AV?$reverse_bidirectional_iterator@Vconst_iterator@?$list@PAVTransport@NETFunc@ @V? $allocator@PAVTransport@NETFunc@@@std@@@std@@PAVTr ansport@NETFunc@@ABQAV45@PBQAV45@H@2@XZ' : identifier was truncated to '255' characters in the browser information c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(134) : see reference to class template instantiation 'std::list >' being compiled c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(753) : see reference to class template instantiation 'NETFunc::List' being compiled c:\program files\microsoft visual studio\vc98\include\list(182) : warning C4786: '?rend@?$list@PAVTransport@NETFunc@@V?$allocator@PAVTransport@NETFunc@@@std@@@std@@QBE?AV?$reverse_bidirectional_iterator@Vconst_iterator@?$list@PAVTransport@NETFunc@@V ? $allocator@PAVTransport@NETFunc@@@std@@@std@@PAVTr ansport@NETFunc@@ABQAV45@PBQAV45@H@2@XZ' : identifier was truncated to '255' characters in the browser information c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(134) : see reference to class template instantiation 'std::list >' being compiled c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(753) : see reference to class template instantiation 'NETFunc::List' being compiled c:\program files\microsoft visual studio\vc98\include\list(176) : warning C4786: '?rbegin@?$list@PAVPlayerStat@NETFunc@@V?$allocator@PAVPlayerStat@NETFunc@@@std@@@std@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$list@PAVPlayerStat@NETFunc@@V? $allocator@PAVPlayerStat@NETFunc@@@std@@@std@@PAVP layerStat@NETFunc@@AAPAV45@PAPAV45@H@2@XZ' : identifier was truncated to '255' characters in the browser information c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(134) : see reference to class template instantiation 'std::list >' being compiled c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(951) : see reference to class template instantiation 'NETFunc::List' being compiled c:\program files\microsoft visual studio\vc98\include\list(178) : warning C4786: '?rbegin@?$list@PAVPlayerStat@NETFunc@@V?$allocator@PAVPlayerStat@NETFunc@@@std@@@std@@QBE?AV?$reverse_bidirectional_iterator@Vconst_iterator@?$list@PAVPlayerStat@NETFu nc@@V? $allocator@PAVPlayerStat@NETFunc@@@std@@@std@@PAVP layerStat@NETFunc@@ABQAV45@PBQAV45@H@2@XZ' : identifier was truncated to '255' characters in the browser information c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(134) : see reference to class template instantiation 'std::list >' being compiled c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(951) : see reference to class template instantiation 'NETFunc::List' being compiled c:\program files\microsoft visual studio\vc98\include\list(180) : warning C4786: '?rend@?$list@PAVPlayerStat@NETFunc@@V?$allocator@PAVPlayerStat@NETFunc@@@std@@@std@@QAE?AV?$reverse_bidirectional_iterator@Viterator@?$list@PAVPlayerStat@NETFunc@@V?$a llocator@PAVPlayerStat@NETFunc@@@std@@@std@@PAVPla yerStat@NETFunc@@AAPAV45@PAPAV45@H@2@XZ' : identifier was truncated to '255' characters in the browser information c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(134) : see reference to class template instantiation 'std::list >' being compiled c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(951) : see reference to class template instantiation 'NETFunc::List' being compiled c:\program files\microsoft visual studio\vc98\include\list(182) : warning C4786: '?rend@?$list@PAVPlayerStat@NETFunc@@V?$allocator@PAVPlayerStat@NETFunc@@@std@@@std@@QBE?AV?$reverse_bidirectional_iterator@Vconst_iterator@?$list@PAVPlayerStat@NETFunc @@V? $allocator@PAVPlayerStat@NETFunc@@@std@@@std@@PAVP layerStat@NETFunc@@ABQAV45@PBQAV45@H@2@XZ' : identifier was truncated to '255' characters in the browser information c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(134) : see reference to class template instantiation 'std::list >' being compiled c:\games\ctp2src\ctp2_code\ui\netshell\netfunc.h(951) : see reference to class template instantiation 'NETFunc::List' being compiled

Last edited by J Bytheway on 29-10-2003 at 20:17

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 20:14 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Remove this text

quote:
Originally posted by J Bytheway
In civsound.h replace the #include "mss.h" with:
code:
// JJB MSS removal // #include "mss.h" // and redefine HAUDIO, HREDBOOK, which were // presumably defined in mss.h: #define HAUDIO uint32 #define HREDBOOK uint32


On second thoughts, I probably should have used typedefs rather than #defines there, but it works anyway...

mjs0 is offline mjs0
Settler
Florida, USA
Jun 2001
time: 00:31
  Old Post 29-10-2003 20:31
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
VS6 to VS.NET conversion Support Apolyton, buy Alpha Centauri

quote:
Originally posted by J Bytheway


What do you mean by the latter - there aren't any "s in the Flex and Bison build commands, are there? They look something like:

code:
$(CDKDIR)\flex -i -o$(ProjDir)\lex.yy.c $(InputPath)


I hope it is OK for a relative newbie to the CTP forums to jump in here (OK, I admit it I've been lurking since before CTPI was released)...I have a lot of hard earned experience in tracking down Visual C++ build errors and couldn't resist pulling down the code to experiment for myself.

Whilst the original VS6 civctp.dsp file (i.e. the project file) does not have quotes in the custom build definitions that invoke flex, byacc etc. all dsw/dsp files go through a conversion process when loading them in VS.NET for the first time resulting in sln/vcproj files that are now stored in XML.

The conversion process is (how shall I put it) ...suboptimal when dealing with environment variables in custom build commands. Basically the conversion process inserts &quot before and after each environment variable resulting in the crippled workspace and project files we now see.

Probably the quickest way to fix this would be to edit the XML files as text and do a global search/replace on a pattern of &quot($envvar)&quot with ($envvar) for each affected environment variable.

I guess I'll try my own suggestion and let you all know if it works.

Martin

Last edited by mjs0 on 29-10-2003 at 20:37

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

The most promising lead I have on HMONITOR is what looks like it might be a definition on line 267 of windef.h, which is amongst the VC++ library files:

code:
#if(WINVER >= 0x0500) #ifndef _MAC DECLARE_HANDLE(HMONITOR); DECLARE_HANDLE(HTERMINAL); DECLARE_HANDLE(HWINEVENTHOOK); #endif #endif /* WINVER >= 0x0500 */


All this kind of stuff is starting to go over my head, though .

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 20:37 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Re: VS6 to VS.NET conversion Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by mjs0
Whilst the original VS6 civctp.dsp file (i.e. the project file) does not have quotes in the custom build definitions that invoke flex, byacc etc. all dsw/dsp files go through a conversion process when loading them in VS.NET for the first time resulting in sln/vcproj files that are now stored in XML.


That makes sense, but it doesn't get me any closer to knowing why the building was not working properly under VS6... But I guess it's not really important (at least until we start fiddling with the lexer/parser files).

mjs0 is offline mjs0
Settler
Florida, USA
Jun 2001
time: 00:31
  Old Post 29-10-2003 20:56
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Re: VS6 to VS.NET conversion Browse Apolyton AD-FREE

quote:
Originally posted by mjs0

Probably the quickest way to fix this would be to edit the XML files as text and do a global search/replace on a pattern of &quot($envvar)&quot with ($envvar) for each affected environment variable.

I guess I'll try my own suggestion and let you all know if it works.

Martin


Well...for VS.NET this approach fixed all the custom build errors so the calls to flex, byacc, ctpdb et al ran successfully.

Now I just have the compiler problems (3275 errors and 1486 warnings) to resolve!!

Martin.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 29-10-2003 20:59 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Well, I popped in a copy of DECLARE_HANDLE(HMONITOR) (which is almost certainly a really bad idea, but never mind) and now the first errors I get are in the DXMedia files, which is a bad sign...

code:
vidplay.cpp c:\dxmedia\classes\base\ctlutil.h(439) : error C2504: 'IBasicVideo2' : base class undefined c:\dxmedia\classes\base\sysclock.h(23) : error C2504: 'IAMClockAdjust' : base class undefined


I also have a whole host more errors in SoundManager.cpp - mostly undeclared identifiers...

vovan is offline vovan
Emperor

Oct 2001
time: 06:31
  Old Post 29-10-2003 22:31
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

quote:
Originally posted by DDowell
How do I solve this?

--------------------Configuration: ctp2 - Win32 Debug Browse--------------------
Performing Custom Build Step on ..\ui\ldl\ldl.y
k:\Activision\CTP2Source\bin\byacc: f - cannot open "/tmp/yacc.aa01116"
Error executing c:\windows\system32\cmd.exe.

CivCTP_dbg.exe - 1 error(s), 0 warning(s)


Just create a temp directory that byacc can write to on your C: hard drive.

vovan is offline vovan
Emperor

Oct 2001
time: 06:31
  Old Post 29-10-2003 22:47
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Lose 30 kilos (of popups)

quote:
Originally posted by J Bytheway
Well, I popped in a copy of DECLARE_HANDLE(HMONITOR) (which is almost certainly a really bad idea, but never mind) and now the first errors I get are in the DXMedia files, which is a bad sign...
code:
vidplay.cpp c:\dxmedia\classes\base\ctlutil.h(439) : error C2504: 'IBasicVideo2' : base class undefined c:\dxmedia\classes\base\sysclock.h(23) : error C2504: 'IAMClockAdjust' : base class undefined


I also have a whole host more errors in SoundManager.cpp - mostly undeclared identifiers...


Well, maybe I'm just pointing out the obvious, but... HMONITOR is just a windows handle for monitors, which can be used to enumerate all of the monitors connected to the system. It's just a GDI thing, so the definition should be included in windows.h, if I am not mistaken...

Solver is offline Solver
Apolyton Duke Of Something
Latvia, Riga
Sep 2000
time: 07:31
  Old Post 30-10-2003 00:19 Visit Solver<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Help yourself to an AD-FREE life

Very interesting. I went ahead to build the source, and got 111 errors. Then I changed the sound system files as John suggested, and got 118 errors on next build.

Pyaray is offline Pyaray
Warlord
Santa Ana, CA, USA
Oct 2000
time: 21:31
  Old Post 30-10-2003 02:53 Visit Pyaray's homepage!
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Increase Your PM Length

quote:
Originally posted by J Bytheway
Does anyone know what the difference is between a "Debug" build and a "Debug Browse" build - I was doing the former but I see that DDowell was doing the latter...


LOL, whoops, forgot about that. You'll want to not use the browse version. I was the one who added the browse version, and it was because I was the only programmer who used both browse info & remote debugging. So (if I remember correctly) it has all kinds of settings that were specific to my machine. The code it generated was the same as debug, it just had additional stuff for me in it, like the inclusion of Browse info, and the remote debugging stuff, but it also has some post build steps that were unique to my machines.

Pyaray

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:31
  Old Post 30-10-2003 03:00
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

John: (RE: HMONITOR)

Found this after doing a goodle on the error msg:

quote:

----- Original Message -----
From: Jacek Ringwelski
To: cdx@yahoogroups.com
Sent: Friday, November 09, 2001 5:57 AM
Subject: Re: [cdx] Compilation Error in CDX 3.1


If your compiling the libraries you need to do the following.

Copy all header file (*.h) from the include directory and paste a copy of
them in the source directory then compile....the workspace was saved and
then the includes were moved to a different directory, that's why you can't
compile as it is currently....

Dev/Admin,
Jacek Ringwelski

 
Pages (8): [ 1   2   3   4     >> ]
< 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.0932 seconds (93.53% PHP - 6.47% 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