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     >> ]
< 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 30-10-2003 03:25 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#31 Report this post to a moderator
Browse Apolyton AD-FREE

quote:
Originally posted by Solver
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.


Were they semantic or syntactic? I've managed to get past the syntax errors now, so I get a whole lot more semantic ones (Undeclared identifiers, etc.). Whereabouts are the errors occuring?

In any case the exact number of errors seems to be subject to significant random fluctuation...

Last edited by J Bytheway on 30-10-2003 at 04:12

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

quote:
Originally posted by vovansim
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...


Well, as I said, I found it in windef.h (which is included by windows.h, which is included by c3.h) but for some reason it's obviously not being processed properly. I don't quite understand the message in Dale's post - does it mean to copy the header files from the VC98\include directory to somewhere in the ctp2_code directory structure? If so, where?

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 30-10-2003 04:43 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#33 Report this post to a moderator
Support Apolyton

OK, I think I've found the problem with HMONITOR - because this is an old version in some sense it's supposed to be using the definition in multimon.h rather than windef.h. I stuck a #include <multimon.h> in the display.h (It was already included in display.cpp so that shouldn't be too drastic a step) and that seems to fix the problem.

I've also commented out most of the code in the SoundManager class, and set it up so that the constructor always reports failure which should then disable the sound system altogether (That's what the code suggests will happen... I just hope that all the code which uses the sound manager bothers to check that it's there first...).

I think that now my only problems are due to those undeclared base classes in the DirectX Media stuff (It causes lots of knock-on errors in vidplay.cpp).

Dale is offline Dale
King
Sir! Why do you keep clicking on me?
Dec 2000
time: 15:31
  Old Post 30-10-2003 04:52
Edit/Delete Message Reply w/Quote
#34 Report this post to a moderator
Inflate your Upload Space

John, I got no idea what the stuff in my above post meant. I was just saying I found it in a google on the error.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 30-10-2003 05:08 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#35 Report this post to a moderator
Avatar Enlargement: We've got the solution

Is it possible to run some kind of "inclusion trace" on the compiler - I want to know how it came to be compiling ctlutil.h, where the error is, starting from vidplay.cpp.

It seems to be through streams.h, but that includes control.h, where the base class is defined, before ctlutil.h, where it was found not to be defined.

Hmm... Why can't we port the whole thing to C#, and then we won't have to worry about these stupid #include statements or the order of declaration at all. They always make my head spin...

And since my head is spinning I think I'll go to bed, but I should probably document my changes to SoundManager.cpp, so I've attached a copy of the version I'm using - in addition to this I added a declaration of S32 to CivSound.h like the other two #defines.

(I added a .txt extension in order to be able to upload this without zipping it - so Locutus, could you possibly get .cpp and .h (and maybe .l and .y) approved as extensions - I suspect we may need them a lot)

Attachment: soundmanager.cpp.txt
This has been downloaded 11 time(s).

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 30-10-2003 20:32 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#36 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Well, here are some references on the primary errors I am now getting - I cannot totally decipher any of them, I think because they refer to DX 8. They also mention "Platform SDK". Does anyone know what that is?

From http://www-personal.monash.edu.au/~...ch/DShowOpenCV/

quote:
I get the following errors when compiling a directshow filter! Whats going on?

...
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\wxut
il.h(530) : error C2061: syntax error : identifier 'DWORD_PTR'
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(437) : error C2504: 'IBasicVideo2' : base class undefined
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(904) : error C2146: syntax error : missing ';' before identifier 'm_dwAdvise'
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(904) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\ctlu
til.h(904) : error C2501: 'm_dwAdvise' : missing storage-class or type specifiers
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\amfi
lter.h(286) : error C2061: syntax error : identifier 'LONG_PTR'
\MICROSOFT SDK\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES\amfi
lter.h(953) : error C2504: 'IPinFlowControl' : base class undefined
...

ANS: -Aug2002- The include path for your directX SDK or Platform SDK must place first under tools/options/Directories/include


This answer I simply cannot comprehend - it doesn't seem to be gramatically correct...

From http://www.funkaspuck.com/mailz/opendivx/msg00206.html

quote:
That was the problem with DirectShow before version 8.
I fixed it by just erasing usage of these interfaces in the
header files. The 8 version works fine without any adjustment.


Which essentially says that the video code needs to be rewritten - I may well try to outcomment it in the mean time since there aren't really many videos in CTP2.

From http://www.unibrain.com/support/dev...development.htm

quote:
2. I installed Fire-i™ and everything went fine all executables and the drivers are working. When I tried to compile the sample programs using VC++ I get: i) compiler errors like these: …error C2504: 'IBasicVideo2' : base class undefined …error C2146: syntax error : missing ';' before identifier 'm_dwAdvise' …error C2501: 'DWORD_PTR' : missing storage-class or type specifiers or, ii) linker errors like these: CameraInfo.obj : error LNK2001: unresolved external Symbol _IID_IAMVideoControl Controler.obj : error LNK2001: unresolved external Symbol _IID_IAMVideoControl CameraInfo.obj : error LNK2001: unresolved external Symbol_IID_ICaptureGraphBuilder2 Whats wrong ???

First of all you must install Platform SDK and DirectX8.0 SDK under the same directory, the default option is "c:\mssdk" from now this path will be reffered as (SDK root). Secondly you must build strmbasd.lib(debug version), or strmbase.lib(release version), "To use the base classes in MicrosoftR DirectShowR, you must build and link the base class library, located in the following directory: (SDK root)\Samples\Multimedia\DirectShow\BaseClasses Note Previous versions of the SDK included the libary as a binary file. With MicrosoftR DirectXR 8.0, you must build this library yourself if you plan to use the base classes."The above quotation is extracted from MS DirectX 8.0 help in: " DirectX 8.0(C++)\DirectShow\DirectShow Reference\DirectShow Base Classes\Using..." You can check it for more information on building the lib. After building that lib you must make sure to point the compiler to search for the header files in: "(SDK root)\Samples\Multimedia\DirectShow\BaseClasses" first, and "(SDK root)\include" second. To do that under VC++6 modify the project's preprocessor settings in "Additional Include directories" textbox in "Project®Settings®C++ Tab" or modify the VC++ global settings by setting the "Include files" in "Tools®Options®Directories Tab" so that the above mentioned paths to the header files are listed in the order mentioned. Also point the linker to search in: "(SDK root)\Samples\Multimedia\DirectShow\BaseClasses\De
bug" first, and "(SDK root)\lib" second. Again one way to do that is by adding the "(SDK root)\Samples\Multimedia\DirectShow\BaseClasses\De
bug" path in the"Library Files" directories of the "Tools®Options" dialog box under "Directories" tab on top of the list and "(SDK root)\lib" second. Also add strmbasd.lib in "Object/Libraries" textbox in "Project®Settings®Link Tab". You must make sure that the files in the above mentioned directories are the files used by the compiler since there are probably more than one versions of these libraries (like strmbasd.lib) and header files(like streams.h) scattered around in your system.


This seems the most promising answer, but none of the directories mentioned in it exist in my installation of the SDK - perhaps that's because of the lack of the mysterious "Platform SDK".

Alternatively, I could just interperet this as saying that the wrong file is probably being included - something I will look into. In particular one relevant file is called control.h, and there could easily be many files of that name...

Anyway, I won't be doing any of this immediately, but I thought I'd check in. This seems to be turning into another one of those threads where I make more than half the posts, but I guess that doesn't hurt my post count . (Edit: If my count is correct my posts account for exactly half... )

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:31
  Old Post 30-10-2003 21:32 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#37 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

you have done 18 the rest has done 18 (not including this one)

which means with my post your wrong ha ha ha ha

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

Let me help John a little further

CtP2 was designed with DirectX 7, so maybe the DirectX problems can be solved by installing the DirectX 7 SDK instead of the DX9 version? I checked the MS website and they still have it available for download. I'm at work now and won't have time tonight, so can't try myself. But if someone has time, might be worth a shot...

DirectX 7.0a SDK: http://www.microsoft.com/downloads/...&displaylang=en

(if the link doesn't work: http://msdn.microsoft.com/downloads/ > enter 'directx sdk' as keyword and click on Go (don't press Enter, won't work!); the file should be on page 2)

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 30-10-2003 23:56 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#39 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

I did what Locutus suggested and installed DirectX 7.0a and DirectX Media SDK as suggested in the readme. I was able to compile the map plug ins Crater.dll, fault.dll, geometric.dll and Plasma2.dll without any problems. I wasn't able to compile the other two projects, because I don't know where I should set the CDKDIR invironment variable. It is very nice that Mr Ogre described the setup process for Windows XP/2000, but I still use Win98. So what is the equivalent of Panel->System->Environment Variables. So what is ment by Panel, does he mean the start menue?

-Martin

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 00:03
Edit/Delete Message Reply w/Quote
#40 Report this post to a moderator
Remove this text

It is the control panel (usually accessable through the start menu yes).

But if you can set env. variables through it on the 98 I'm not sure of...

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

You should be able to set environment variables at the command promt too, syntax is something like:

code:
SET CDKDIR=C:\...

I suggest you search the windows help for "environment variable" (Or some German translations thereof...)

Last edited by J Bytheway on 31-10-2003 at 01:23

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

I *think* you need to set them up in Autoexec.bat...

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 31-10-2003 01:18 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#43 Report this post to a moderator
Avatar Enlargement: We've got the solution

Unfortunatly I already had the idea to put:

SET CDKDIR = C:\Activision\CTP2\bin

into my Autoexec.bat

I didn't find anything about "environment variable" or "Umgebungsvariable" in the windows help.

Does anybody know how the dos command is called that could me show all defined varaibles in.

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 01:26 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#44 Report this post to a moderator
Get a bigger avatar today!

Yes, just type SET to list all defined variables, or SET CDKDIR to print the current value of CDKDIR.

If all else fails you can just substitute the value you want for all occurances of CDKDIR in the Custom Build settings - there aren't really that many of them.

I am making further progress - I have tried shifting around the order of the include directories in order to get the right files included (because many share the same names). Unfortunately, whichever order I use I get at least some errors, but different ones in each case. I'm not sure how to handle this yet...

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 31-10-2003 01:35 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#45 Report this post to a moderator
Tired of ads?

SET CDKDIR prints Syntaxfehler in English syntax error. Set alone prints all the variables and CDKDIR with its supposed value is there. Fortunatly I only have to change some project file and not the source itsself.

-Martin

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 01:41 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#46 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

Alternatively, you could cut out the path prior to the command in the Custom Build settings, i.e. use just byacc, rather than $(CDKDIR)\byacc, and then add the place where byacc resides to your PATH.

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

Well I now replaced all occurences of the path variable by the absolute path. But now it tells me that building of "C:\Activision\Ctp2\ctp2_code\GS\DBGEN\y.tab.c" failed when I try to compile the ctp2.exe. When I try to compile the ctpdb.exe it cannot open "/tmp/yacc.aa10481" and cannot find 'y.tab.h'.

-Martin

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

Creating a directory called c:\tmp for byacc to use for its temporary files should solve the latter problem, and you need to compile the ctbdb.exe before ctp2.exe, so hopefully once you've done that the first problem should go away.

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

Well, in closing for today, here is my best error count to date (I think it's fairly deceptive though, there are other errors that are not being reached)

code:
--------------------Configuration: ctp2 - Win32 Debug-------------------- Compiling... vidplay.cpp c:\dx90sdk\include\control.h(165) : error C2146: syntax error : missing ';' before identifier 'OAEVENT' c:\dx90sdk\include\control.h(165) : fatal error C1004: unexpected end of file found Error executing cl.exe. CivCTP_dbg.exe - 2 error(s), 0 warning(s)


I can get rid of these by switching to use the DirectMedia version of control.h, but then I get errors relating to the clock definitions because I need to use the DirectX version of strmif.h.

I guess my next attack will be to try with DirectX 7.0a.

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
  Old Post 31-10-2003 03:33 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#50 Report this post to a moderator
Help yourself to an AD-FREE life

I am down to 53 errors. Unfortunatly it starts with:

code:
C:\Activision\Ctp2\ctp2_code\ctp\display.cpp(68) : error C2065: 'LPDIRECTDRAWENUMERATEEX' : nichtdeklarierter Bezeichner


but the ideentifer should be declared in ddraw.h.

And I get also two directX errors that causes a lot of other errors:
code:
C:\DXMedia\classes\base\ctlutil.h(439) : error C2504: 'IBasicVideo2' : Basisklasse undefiniert C:\DXMedia\classes\base\sysclock.h(23) : error C2504: 'IAMClockAdjust' : Basisklasse undefiniert


Well that should it be for tonight.

-Martin

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:31
Post  Old Post 31-10-2003 03:48 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#51 Report this post to a moderator
Put an end to popups!

OK I figured out how can I change in my Visuell C++ Authors Edition the project configuration. I switched to Debug and now I get:

code:
--------------------Konfiguration: ctp2 - Win32 Debug-------------------- Kompilierung läuft... display.cpp c:\activision\ctp2\ctp2_code\ctp\display.cpp(68) : error C2065: 'LPDIRECTDRAWENUMERATEEX' : nichtdeklarierter Bezeichner c:\activision\ctp2\ctp2_code\ctp\display.cpp(68) : error C2146: Syntaxfehler : Fehlendes ';' vor Bezeichner 'pfnEnum' c:\activision\ctp2\ctp2_code\ctp\display.cpp(68) : error C2065: 'pfnEnum' : nichtdeklarierter Bezeichner c:\activision\ctp2\ctp2_code\ctp\display.cpp(77) : error C2146: Syntaxfehler : Fehlendes ';' vor Bezeichner 'GetProcAddress' c:\activision\ctp2\ctp2_code\ctp\display.cpp(84) : error C2100: Zeigeroperation ungueltig Fehler beim Ausführen von cl.exe. CivCTP_dbg.exe - 5 Fehler, 0 Warnung(en)


Looks like I just need a file were 'LPDIRECTDRAWENUMERATEEX' is properly defiened.

-Martin

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 12:57
Edit/Delete Message Reply w/Quote
#52 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

quote:
Originally posted by Martin Gühmann
Looks like I just need a file were 'LPDIRECTDRAWENUMERATEEX' is properly defiened.


Or you can define it yourself as

code:
typedef HRESULT (__stdcall *LPDIRECTDRAWENUMERATEEX) (int (__stdcall *) (GUID*,LPSTR,LPSTR,LPVOID,HMONITOR),LPVOID,DWORD);

Mr Ogre is offline Mr Ogre
Warlord
Azeroth
Jan 1970
time: 05:31
  Old Post 31-10-2003 13:07 Visit Mr Ogre's homepage!
Edit/Delete Message Reply w/Quote
#53 Report this post to a moderator
Got spare money?

Alright, so I managed to compile and link it from the downloaded source, so I'm fairly sure it all made it out intact .

I am using XP and DevStudio 6. Without referencing my own README, here's what I had to do:

Set CDKDIR. If in Win98/ME, doing it in autoexec.bat is correct. The syntax there is SET CDKDIR=C:\cygwin\bin

Get DirectX and DXMedia. I am using DirectX 9, no problems.

MAKE SURE THE INCLUDE PATHS FOR DIRECTX AND DXMEDIA COME FIRST IN YOUR SETTINGS. That is very important, especially for DirectX. If you don't do this step, you will get the wrong version of ddraw.h, the one that's included with VC++ 6.0 is horribly outdated. Go to Tools->Options->Directories, Include Files, and put C:\DXSDK\Include at the top of the list, and just under it, add c:\DXMedia\include and then c:\DXMedia\classes\base. That assumes you installed them to DXSDK and DXMedia.

Copy the libraries into the ctp2 libs folder:

copy c:\dxsdk\lib\*.lib (ctp2_src)\libs\directx\lib
copy c:\dxmedia\lib\*.lib (ctp2_src)\libs\dxmedia\lib

(I actually just copied all of dxmedia there, but I think you only need the lib directory)

Remove the mss lib from the project settings. Project->Settings->Link, find ..\libs\miles\mss32.lib and remove it.

In CivSound.h, comment out #include "mss.h". Add this:

typedef void *HAUDIO;

In SoundManager.h, add this:

typedef void *HREDBOOK;

In civsound.cpp and soundmanager.cpp, remove the bodies of all the functions. (Leave return values in for non-void functions)

Make the temp directory for byacc (c:\tmp)

That is all I did today, and it all compiled, linked, and ran! Sound was missing of course, but it seems to work. I played one whole turn . But it's possible I did something else on this machine when I was putting things together for the release before.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 13:34 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#54 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Thanks - the order of the include directories is what I most wanted to know...

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 14:52
Edit/Delete Message Reply w/Quote
#55 Report this post to a moderator
Enter the AD-FREE zone

I'm getting two errors when doing as Mr. Ogre suggested.
They are both concerning the video/movie section of the game.

code:
K:\CTP2S\ctp2_code\ui\aui_directx\aui_directmovie.cpp(197) : error C2065: 'UNITS' : undeclared identifier K:\CTP2S\ctp2_code\ui\aui_directx\aui_directmovie.cpp(197) : error C2065: 'MILLISECONDS' : undeclared identifier


Did you (Ogre) define those yourself (and if so, what values did you use) or how did you do away with them?

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 16:33
Edit/Delete Message Reply w/Quote
#56 Report this post to a moderator
Increase the size of your Attachments

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

ahenobarb is offline ahenobarb
Prince

Nov 2001
time: 05:31
  Old Post 31-10-2003 20:39
Edit/Delete Message Reply w/Quote
#57 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

quote:
Originally posted by DDowell
Well, I fix that problem (UNITS/MILLISECONDS)


How? I did some late night compiling and have been working through errors. Although I haven't come across this one (yet), it would be useful to know how to jump the hurdles ahead. Thanks in advance.

J Bytheway is offline J Bytheway
Emperor
England
Jul 2001
time: 05:31
  Old Post 31-10-2003 20:43 Visit J Bytheway's homepage!
Edit/Delete Message Reply w/Quote
#58 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

I foolishly increased the warning level to 4, just as an experiment, and saw thousands of warnings (I later discovered that it was 51822...), so I decided that this was a bad idea and reduced it to level 3 again. Unfortunately, this has had no effect, and I'm still seeing level 4 warnings no matter what I do, even if I replace the project file with the original one from the source distribution... Does anyone have any ideas as to what might be going on? I can't carry on like this, and the only way I can see to solve this is to totally reinstall Visual Studio, or solve all 50000 odd warnings, and that would be tiresome...

DDowell is offline DDowell
Chieftain
Västerås, Sweden
Nov 2001
time: 06:31
  Old Post 31-10-2003 20:54
Edit/Delete Message Reply w/Quote
#59 Report this post to a moderator
Get a bigger avatar today!

quote:
Originally posted by ahenobarb


How? I did some late night compiling and have been working through errors. Although I haven't come across this one (yet), it would be useful to know how to jump the hurdles ahead. Thanks in advance.


I simply defined it as it stated in the MSDN. If it is entirely correct in as for the CTP2 source is concerned I'm not sure of.

This is the defines (and typedefs):

code:
... #define NANOSECONDS 1000000000 //10^9 ... #define MILLISECONDS 1000 //10^3 ... #define UNITS NANOSECONDS/100 //10^7 ...


Anyone got a suggestion to my link problem?

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

quote:
Originally posted by J Bytheway
I foolishly increased the warning level to 4, just as an experiment, and saw thousands of warnings (I later discovered that it was 51822...), so I decided that this was a bad idea and reduced it to level 3 again. Unfortunately, this has had no effect, and I'm still seeing level 4 warnings no matter what I do, even if I replace the project file with the original one from the source distribution...


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).

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

 
Pages (8): [ 1   2   3   4   5     >> ]
< 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.0685 seconds (91.42% PHP - 8.58% 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