Compiler says iGUI is screwy?!

More
20 years 2 days ago #18059 by Second Chance
I was just attempting to compile a small scenario script I'm working on, and calls to any function from iGUI are getting me errors of:
Code:
---------- Capture Output ---------- "C:\. . .\compile.bat" spacemaster.pog PC (Pog Compiler) Copyright (c) 1998-9 Particle Systems Ltd. Using compiler runtime of class "fcPogCompiler" version 1.5 Compiling source file spacemaster.pog... Translating... Analysing... C:\Program Files\Infogrames\Pog Script\include\iGUI.h(21) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(23) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(25) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(27) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(29) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(31) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(33) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(35) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(37) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(39) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(41) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(43) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(45) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(47) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(49) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(51) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(53) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(55) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(57) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(59) : Error: Undeclared identifier ("list") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(61) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(63) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(65) : Error: Undeclared identifier ("list") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(67) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(69) : Error: Undeclared identifier ("list") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(71) : Error: Undeclared identifier ("list") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(73) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(75) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(77) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(79) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(81) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(83) : Error: Undeclared identifier ("list") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(85) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(87) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(89) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(91) : Error: Undeclared identifier ("hwindow") C:\Program Files\Infogrames\Pog Script\include\iGUI.h(93) : Error: Undeclared identifier ("hwindow") spacemaster.pog(15) : Error: The imported header file contained errors spacemaster.pog(71) : Error: Undeclared identifier ("iGUI.CreateWideShadyBar") spacemaster.pog(72) : Error: Undeclared identifier ("iGUI.AddTitle") Warning: Not overwriting header file with generated header ("C:\. . .\spacemaster.h") 40 errors, 1 warning Terminated with exit code 40
Anyone know why I'm having trouble with iGUI? If you'll notice, the last two errors are my code failing because they refer to iGUI.

Here's the source:
Code:
// // (c) 1999 Particle Systems Ltd. All Rights Reserved // // spacemaster // // // // Main package for the SpaceMaster game scenario // // // Package name package spacemaster; // Imports - the other packages we are using in this script. uses iGUI, GUI; // Exports - Functions in this package that other scripts can use. provides ScenarioMain, Main; // Enumerators (optional) - Any enumerators for the script defined here. // Prototypes - Functions defined for use in this package. prototype PlayerSetupScreen(); prototype SpacemasterOnBackButton(); // Code starts here ScenarioMain() { // Intro screen and/or movie iGUI.OverlayCustomScreen("spacemaster.PlayerSetupScreen"); // Player setup // Map setup } Main() { // Imperial gov't setup // Provincial gov't setup // Business operations setup // Criminal operations setup // Start location setup // Player craft setup } // ***** SpaceMaster functions ***** // Employment generator functions // Sensor functions // Political functions // Business functions // Criminal functions // SpaceMaster generic display functions PlayerSetupScreen() { // Locals hwindow shady_bar; // Screen setup shady_bar = iGUI.CreateWideShadyBar(); iGUI.AddTitle(shady_bar, "SPACEMASTER"); } SpacemasterOnBackButton() { GUI.RemoveLastOverlay(); } // Galactic event functions // Planet functions // Station functions // Fleet functions // END OF FILE
I haven't coded in months and months. Am I just missing something monumentally obvious?

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
20 years 2 days ago #9830 by GrandpaTrout
Header file import order. Put GUI first, then iGUI.

-Gtrout

Please Log in or Create an account to join the conversation.

More
20 years 2 days ago #9834 by Second Chance
Thanks, that solved most of the errors. But there are now 11 iGUI errors citing "list" as an undeclared identifier. Which is strange, because that's more "list" errors than there were originally (only 5 errors). Is there a header file that always need to be imported?

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
20 years 2 days ago #9835 by MajorTom
The reason for more "list" errors is: as it imports the IGUI functions it finds more references to "list". (iGui relies heavily on list)

There is no single standard header. The "uses" section of a typical GUI script commonly includes:

iGame, List, GUI, iGUI, String, Text, INIfile, Global, Debug,
Task, Object;

Depending on what your GUI does, you might need other stuff like:

iInventory, iCargo, iFaction, iTrade, iMusic, Sim, iShip, Config,

ect, ect;

Usually the order of the import doesn't matter, except in rare cases (normally, the inter-header dependiencies are listed in the header files themselves.)




Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
20 years 2 days ago #9836 by Second Chance
So any idea what the problem is? I've never had this problem before. And I haven't changed any of the header files.

iGUI has no dependencies listed.

*edit*
Included List at the end of the uses section. No effect. Then I included List at the beginning of the uses section, problem solved. Maybe I should include List in the uses section of the iGUI header file.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos (on hold during SW MP mod)
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
20 years 1 day ago #9839 by GrandpaTrout
A package must include all headers that it intends to use. Plus all headers needed by the packages it exports. And (like C of old) it requires that types be defined before they are used, so include *order* is very important.

The easiest solution is to just create a standard pog file template that includes the most common headers. You can always delete them if you find your don't need them. Check out any of the sample POG files for a full list of includes, in proper order.

Beware of very slow compiles if you modify the header files to include every file they might need. And I honestly don't know how POG handles multiple definitions. There is no preprocessor to strip out #include protected files. It also breaks the auto header file creation of the compiler. But you are welcome to try. I would be interested to hear the results.

-Gtrout

Please Log in or Create an account to join the conversation.