Re: [DM-dev] reward: what the Hell is wrong with this code?
Brought to you by:
acdalton,
henningsen
From: Henningsen <al...@gl...> - 2001-05-23 12:50:17
|
I tried to compile the latest CVS, and got this error log, even with line 70 commented out: cd /home/peter/DungeonMaker/sf2new/dungeonmaker/dungeonmaker/ make -k /home/peter/DungeonMaker/sf2new/dungeonmaker/shared.make:51: main_hierarchy.d: No such file or directory main_test.cpp:21: warning: No include path in which to find dm/PropertyList.h main_hierarchy.cpp:22: warning: No include path in which to find dm/PropertyList.h main_hierarchy.cpp:25: warning: No include path in which to find dm/DungeonElement.h main_hierarchy.cpp:26: warning: No include path in which to find dm/Room.h main_hierarchy.cpp:27: warning: No include path in which to find dm/Wall.h main_hierarchy.cpp:28: warning: No include path in which to find dm/DMGrid.h main_hierarchy.cpp:29: warning: No include path in which to find dm/Door.h make[1]: Entering directory `/home/peter/DungeonMaker/sf2new/dungeonmaker/dungeonmaker' g++ -Wall -g -I. -I/home/peter/DungeonMaker/sf2new/dungeonmaker/include -c main_random.cpp -o main_random.o g++ -Wall -g -I. -I/home/peter/DungeonMaker/sf2new/dungeonmaker/include -L-L/usr/lib -L/usr/local/lib -L. -lstdc++ -o dungeonmaker main.o /home/peter/DungeonMaker/sf2new/dungeonmaker/libdm/libDungeonMaker.a g++ -Wall -g -I. -I/home/peter/DungeonMaker/sf2new/dungeonmaker/include -L-L/usr/lib -L/usr/local/lib -L. -lstdc++ -o randomdungeon main_random.o /home/peter/DungeonMaker/sf2new/dungeonmaker/libdm/libDungeonMaker.a g++ -Wall -g -I. -I/home/peter/DungeonMaker/sf2new/dungeonmaker/include -c main_hierarchy.cpp -o main_hierarchy.o main_hierarchy.cpp:22: dm/PropertyList.h: No such file or directory main_hierarchy.cpp:25: dm/DungeonElement.h: No such file or directory main_hierarchy.cpp:26: dm/Room.h: No such file or directory main_hierarchy.cpp:27: dm/Wall.h: No such file or directory main_hierarchy.cpp:28: dm/DMGrid.h: No such file or directory main_hierarchy.cpp:29: dm/Door.h: No such file or directory make[1]: *** [main_hierarchy.o] Error 1 make[1]: Target `all-local' not remade because of errors. make[1]: Leaving directory `/home/peter/DungeonMaker/sf2new/dungeonmaker/dungeonmaker' make: *** [.] Error 2 make: Target `default' not remade because of errors. Compilation exited abnormally with code 2 at Wed May 23 09:01:47 Obviously my environment failed to find many files, not just Door.h. One mistake I see is that you include your own files in brackets, like in #include <dm/Door.h> This is the way to include library files. The proper way to include files you wrote yourself is #include "dm/Door.h" But what baffles me is that this hasn't produced a mistake earlier. Other than that, I really can't help. This type of mistake is the reason I like to keep with simple make-files and not too many files in the project, 'cause i don't understand what's going on;-( The shared.make error at the start is particularly weird: What the dickens is main_hierarchy.d? Not mentioned on that line, but substituted from somewheres... the other mistakes could all be due to <> instead of "". Good luck, Peter At 08:33 PM 5/21/01 +0200, you wrote: >Just checked in: >drastically altered/simplified Door/Wall objects. But for some reason I can't >get the main() function to compile: parse error. It's telling me that Door >isn't defined. But Door.h is included, and everything matches up, as far as I >can see. > >Can you PLEASE take a look at dungeonmaker/main_hierarchy.cpp, line 69 and >tell me why the hell it doesn't compile if I uncomment line 70? I'm at a >complete loss. |