Could not find source file: asset/GroundStation.cpp

Discussion of compilation configuration and issues

Could not find source file: asset/GroundStation.cpp

Postby ryan88 » Fri Apr 19, 2013 11:40 am

I have been trying to compile GMAT R2013a on linux but have been coming up with some problems. Here are the steps I took:

  1. Fired up virtualbox and created a new VM and installed Ubuntu 12.04 LTS x84
  2. Did all updates reported in Update Manager
  3. Installed prerequisites using: sudo apt-get install gnome-core-devel build-essential libgtk2.0-dev libgtk2.0-doc devhelp libgl1-mesa-dev libglu1-mesa-dev freeglut3 freeglut3-dev libdevil-dev subversion cmake cmake-gui
  4. Downloaded gmat: svn co https://svn.code.sf.net/p/gmat/code/tags/R2013a/ ~/gmat
  5. cd ~/gmat/depends
  6. chmod +x configure.sh
  7. ./configure.sh -p ~/gmat
  8. cd ~/gmat/build
  9. chmod +x build.sh
  10. ./build.sh -arch x86

Everything looked to be ok until that last step when I received the following error:

Code: Select all
CMake Error at base/CmakeLists.txt:512 (ADD_LIBRARY):
    Cannot find source file:

        asset/GroundStation.cpp
   
    Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
    .hxx .in .txx


I believe the problem comes from the gmat/src/base/CMakeLists.txt on line 120 that defines the source files:

Code: Select all
asset/GroundStation.cpp


The asset folder does not contain a GroundStation.cpp file, it does however contain a GroundstationInterface.cpp file. Is this what should be used?
ryan88
 
Posts: 13
Joined: Fri Apr 19, 2013 11:16 am
Location: United Kingdom

Re: Could not find source file: asset/GroundStation.cpp

Postby ryan88 » Fri Apr 19, 2013 1:39 pm

Ok, so I went ahead and made modifications to the gmat/src/base/CMakeLists.txt file in order to satisfy cmake:

Line 120 changed from

Code: Select all
asset/GroundStation.cpp


To:

Code: Select all
asset/GroundstationInterface.cpp


I commented out lines 142, 159 and 176 as the following files do not exist:

command/CallGmatFunction.cpp
command/Global.cpp
command/Save.cpp

I also changed line 444 from:

Code: Select all
spacecraft/Formation.cpp


To:

Code: Select all
spacecraft/FormationInterface.cpp


With these changes, GMAT started to compile. It got to 21%, but then gave the following error:

Code: Select all
/home/ryan/gmat/src/base/factory/AssetFactory.cpp:25:29: fatal error: GroundStation.hpp: No such file or directory
ryan88
 
Posts: 13
Joined: Fri Apr 19, 2013 11:16 am
Location: United Kingdom

Re: Could not find source file: asset/GroundStation.cpp

Postby ryan88 » Fri Apr 19, 2013 7:52 pm

I've done some further digging and found the following:

Code: Select all
cd ~/gmat

find -name GroundStation.cpp
./plugins/StationPlugin/src/base/station/GroundStation.cpp

find -name Formation.cpp
./plugins/FormationPlugin/src/case/formation/Formation.cpp

find -name Global.cpp
./plugins/GmatFunctionPlugin/src/base/command/Global.cpp

find -name Save.cpp
./plugins/SaveCommandPlugin/src/base/command/Save.cpp


It looks like this stuff has been split out from the main gmat source and been placed into plugins, but the CMakeLists.txt has not been updated accordingly?
ryan88
 
Posts: 13
Joined: Fri Apr 19, 2013 11:16 am
Location: United Kingdom

Re: Could not find source file: asset/GroundStation.cpp

Postby djordan » Fri Apr 19, 2013 8:48 pm

I've been following down the same path as ryan. With the same modifications to CMakeLists as stated above, plus removing Global.cpp & Save.cpp, and changing Formation.cpp to FormationInterface.cpp, cmake does complete successfully, but the build fails on...

Code: Select all
~/dev/GMAT/trunk/src/base/factory/AssetFactory.cpp
~dev/GMAT/trunk/src/base/factory/AssetFactory.cpp:25:29: error: GroundStation.hpp: No such file or directory


I went in and tried to change AssetFactory.cpp to reference GroundstationInterface which didn't work. I also tried referencing GroundStationPanel, but that also failed. At this point I don't know how to proceed cause I'm not sure how deep the rabbit hole goes, or which path to take.

Any help would be appreciated. :D
djordan
 
Posts: 5
Joined: Fri Apr 20, 2012 7:44 pm

Re: Could not find source file: asset/GroundStation.cpp

Postby pdw » Sat Apr 20, 2013 1:48 am

I was having the same problem, and tried to proceed down the various paths described by ryan and djordan.

I managed to get the gmatConsole to compile by adding the "Interface" files that were mentioned in the earlier comments, modifying the paths to the files that have been moved to plugins, and adding "INCLUDE_DIRECTORIES" entries for those plugins. I imagine there's a more elegant way of doing this, but at least it seems to be making progress.

Here's a patch file that captures what I did:

Code: Select all
Index: src/base/CMakeLists.txt
===================================================================
--- src/base/CMakeLists.txt   (revision 11837)
+++ src/base/CMakeLists.txt   (working copy)
@@ -109,6 +109,14 @@
 INCLUDE_DIRECTORIES("./math")
 INCLUDE_DIRECTORIES("./plugin")
 INCLUDE_DIRECTORIES("./event")
+INCLUDE_DIRECTORIES("../../plugins/StationPlugin/src/base/station")
+INCLUDE_DIRECTORIES("../../plugins/StationPlugin/src/base/include")
+INCLUDE_DIRECTORIES("../../plugins/GmatFunctionPlugin/src/base/command")
+INCLUDE_DIRECTORIES("../../plugins/GmatFunctionPlugin/src/base/include")
+INCLUDE_DIRECTORIES("../../plugins/SaveCommandPlugin/src/base/command")
+INCLUDE_DIRECTORIES("../../plugins/SaveCommandPlugin/src/base/include")
+INCLUDE_DIRECTORIES("../../plugins/FormationPlugin/src/base/formation")
+INCLUDE_DIRECTORIES("../../plugins/FormationPlugin/src/base/include")
 
 # ====================================================================
 # source files
@@ -117,7 +125,8 @@
 SET(BASE_SRCS
     asset/AssetException.cpp
     asset/BodyFixedPoint.cpp
-    asset/GroundStation.cpp
+    asset/GroundstationInterface.cpp
+    ../../plugins/StationPlugin/src/base/station/GroundStation.cpp
     attitude/Attitude.cpp
     attitude/AttitudeException.cpp
     attitude/CSFixed.cpp
@@ -139,7 +148,7 @@
     command/BeginScript.cpp
     command/BranchCommand.cpp
     command/CallFunction.cpp
-    command/CallGmatFunction.cpp
+    ../../plugins/GmatFunctionPlugin/src/base/command/CallGmatFunction.cpp
     command/CommandException.cpp
     command/GmatCommand.cpp
     command/CommandUtil.cpp
@@ -156,7 +165,7 @@
     command/EndTarget.cpp
     command/EndWhile.cpp
     command/For.cpp
-    command/Global.cpp
+    ../../plugins/GmatFunctionPlugin/src/base/command/Global.cpp
     command/If.cpp
     command/ManageObject.cpp
     command/Maneuver.cpp
@@ -173,7 +182,7 @@
    command/SolverSequenceCommand.cpp
     command/Report.cpp
     command/RunSolver.cpp
-    command/Save.cpp
+    ../../plugins/SaveCommandPlugin/src/base/command/Save.cpp
     command/SaveMission.cpp
     command/SolverBranchCommand.cpp
     command/Stop.cpp
@@ -441,7 +450,8 @@
     solver/Gradient.cpp
     solver/Jacobian.cpp
     solver/LineSearch.cpp
-    spacecraft/Formation.cpp
+    spacecraft/FormationInterface.cpp
+    ../../plugins/FormationPlugin/src/base/formation/Formation.cpp
     spacecraft/Spacecraft.cpp
     spacecraft/SpaceObject.cpp
     spacecraft/TextTrajectoryFile.cpp


It got through building GmatBase and gmatConsole but was then giving errors along the lines of the following while building the GUI:

Code: Select all
~/R2013a/src/gui/rendering/ModelObject.hpp: In function 'char Load3DS(ModelObject*, const std::string&)':
~/R2013a/src/gui/rendering/ModelObject.hpp:104: error: 'int ModelObject::num_vertices' is private


This presumably is a separate issue (I'm building under x64, for reference to anyone who may know something about this item), but I'm going to stop digging further for the moment. I did confirm the console application worked properly by running a few of the example scripts though.
pdw
 
Posts: 1
Joined: Sat Apr 20, 2013 1:21 am

Re: Could not find source file: asset/GroundStation.cpp

Postby jjkparker » Mon Apr 22, 2013 6:30 pm

Hi guys,

Looks like you found our CMake-based build system, which isn't surprising, since that's what README.txt points to.

The CMake-based system is currently in alpha mode, as we experiment with it and determine if we want to move in that direction. It looks like we've made enough code changes to break it entirely, unfortunately.

The current operational build system is the Makefile-based system. This page has some documentation on using the Makefiles on Mac:
http://gmat.ed-pages.com/wiki/Building+on+Mac

It will be slightly different on Linux, but this should get you moving in the right track. I suggest building without plugins first, then adding each plugin as you need it.
Joel J. K. Parker
Flight dynamics engineer, GMAT team
http://gmatcentral.org
jjkparker
 
Posts: 617
Joined: Thu Jan 07, 2010 9:48 pm
Location: NASA Goddard Space Flight Center, Greenbelt, MD

Re: Could not find source file: asset/GroundStation.cpp

Postby ryan88 » Mon Apr 22, 2013 7:02 pm

I had a look at the Visual Studio project files today and found that the asset/AssetFactory.cpp filewas not referenced in there at all, so I tried commenting it out as well as the other changes I mentioned in a previous post and got to about the same stage as pdw. GmatBase and and gmatConsole built correctly and I was able to run scripts using gmatConsole, but the build failed whilst building the gui with the following errors:

Code: Select all
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp: In function ‘char Load3DS(ModelObject*, const string&)’:
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:96:14: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:97:14: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:98:14: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:99:16: error: ‘std::string ModelObject::name’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:129:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:143:47: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:144:23: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:148:27: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:154:32: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:154:68: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:111:35: error: ‘vector_type ModelObject::vertex [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:157:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:111:35: error: ‘vector_type ModelObject::vertex [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:159:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:111:35: error: ‘vector_type ModelObject::vertex [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:161:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:111:35: error: ‘vector_type ModelObject::vertex [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:164:84: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:111:35: error: ‘vector_type ModelObject::vertex [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:165:84: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:111:35: error: ‘vector_type ModelObject::vertex [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:166:84: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:176:47: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:177:23: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:181:27: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:187:32: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:187:66: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:188:33: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:189:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:190:33: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:191:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:192:33: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:193:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:197:84: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:198:84: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:114:37: error: ‘polygon_type ModelObject::polygon [100000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:199:84: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:218:39: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:220:37: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:225:40: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:234:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:235:32: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:235:81: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:239:29: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:249:32: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:249:66: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:115:43: error: ‘texmap_coord_type ModelObject::mapcoord [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:251:33: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:115:43: error: ‘texmap_coord_type ModelObject::mapcoord [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:253:16: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:115:43: error: ‘texmap_coord_type ModelObject::mapcoord [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:253:43: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:115:43: error: ‘texmap_coord_type ModelObject::mapcoord [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:257:35: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:115:43: error: ‘texmap_coord_type ModelObject::mapcoord [200000]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:257:60: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:263:23: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:271:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:271:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:274:23: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:274:42: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:286:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:286:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:287:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:287:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:288:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:288:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:289:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:289:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:293:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:293:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:294:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:294:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:295:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:295:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:296:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:296:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:300:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:300:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:301:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:301:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:302:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:302:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:303:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:303:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:320:23: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:320:42: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:123:40: error: ‘material_type ModelObject::material [500]’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:332:26: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:106:8: error: ‘int ModelObject::num_materials’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:332:45: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:104:8: error: ‘int ModelObject::num_vertices’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:348:23: error: within this context
/home/ryan/gmat/src/gui/rendering/ModelObject.hpp:105:8: error: ‘int ModelObject::num_polygons’ is private
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:348:47: error: within this context
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:103:39: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:107:43: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:128:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:142:61: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:156:51: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:158:51: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:160:51: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:175:61: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:188:81: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:190:81: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:192:81: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:194:71: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:214:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:232:61: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:237:64: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:247:61: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:251:71: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:270:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:281:56: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:282:56: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:283:56: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:319:57: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
/home/ryan/gmat/src/gui/rendering/Load3ds.cpp:331:44: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
make[2]: *** [/home/ryan/gmat/build/src/gui/CMakeFiles/GmatGui.dir/rendering/Load3ds.cpp.o] Error 1
make[1]: *** [/home/ryan/gmat/build/src/gui/CMakeFiles/GmatGui.dir/all] Error 2
make: *** [all] Error 2


If people are interested, here is a svn diff of the changes I made to src/base/CMakeLists.txt:

Code: Select all
Index: /home/ryan/gmat/src/base/CMakeLists.txt
===================================================================
--- /home/ryan/gmat/src/base/CMakeLists.txt    (revision 11837)
+++ /home/ryan/gmat/src/base/CMakeLists.txt    (working copy)
@@ -117,7 +117,7 @@
 SET(BASE_SRCS
     asset/AssetException.cpp
     asset/BodyFixedPoint.cpp
-    asset/GroundStation.cpp
+    asset/GroundstationInterface.cpp
     attitude/Attitude.cpp
     attitude/AttitudeException.cpp
     attitude/CSFixed.cpp
@@ -139,7 +139,7 @@
     command/BeginScript.cpp
     command/BranchCommand.cpp
     command/CallFunction.cpp
-    command/CallGmatFunction.cpp
+    #command/CallGmatFunction.cpp
     command/CommandException.cpp
     command/GmatCommand.cpp
     command/CommandUtil.cpp
@@ -156,7 +156,7 @@
     command/EndTarget.cpp
     command/EndWhile.cpp
     command/For.cpp
-    command/Global.cpp
+    #command/Global.cpp
     command/If.cpp
     command/ManageObject.cpp
     command/Maneuver.cpp
@@ -173,7 +173,7 @@
     command/SolverSequenceCommand.cpp
     command/Report.cpp
     command/RunSolver.cpp
-    command/Save.cpp
+    #command/Save.cpp
     command/SaveMission.cpp
     command/SolverBranchCommand.cpp
     command/Stop.cpp
@@ -230,7 +230,7 @@
     executive/SandboxException.cpp
     executive/Sandbox.cpp
     factory/AtmosphereFactory.cpp
-    factory/AssetFactory.cpp
+    #factory/AssetFactory.cpp
     factory/AttitudeFactory.cpp
     factory/AxisSystemFactory.cpp
     factory/BurnFactory.cpp
@@ -441,7 +441,7 @@
     solver/Gradient.cpp
     solver/Jacobian.cpp
     solver/LineSearch.cpp
-    spacecraft/Formation.cpp
+    spacecraft/FormationInterface.cpp
     spacecraft/Spacecraft.cpp
     spacecraft/SpaceObject.cpp
     spacecraft/TextTrajectoryFile.cpp
ryan88
 
Posts: 13
Joined: Fri Apr 19, 2013 11:16 am
Location: United Kingdom

Re: Could not find source file: asset/GroundStation.cpp

Postby ryan88 » Mon Apr 22, 2013 8:33 pm

I got the gui working too. All you need to do are make the following changes:

Code: Select all
Index: /home/ryan/gmat/src/gui/CMakeLists.txt
===================================================================
--- /home/ryan/gmat/src/gui/CMakeLists.txt    (revision 11837)
+++ /home/ryan/gmat/src/gui/CMakeLists.txt    (working copy)
@@ -191,24 +191,24 @@
 # source files
 SET(GUI_SRCS
     app/AboutDialog.cpp
+    app/CompareFilesDialog.cpp
+    app/CompareTextDialog.cpp
     app/GmatApp.cpp
     app/GmatAppData.cpp
-    app/CompareFilesDialog.cpp
-    app/CompareTextDialog.cpp
     app/GmatConnection.cpp
     app/GmatMainFrame.cpp
     app/GmatMenuBar.cpp
+    app/GmatNotebook.cpp
+    app/GmatServer.cpp
     app/GmatToolBar.cpp
+    app/GmatTreeItemData.cpp
     app/GuiInterpreter.cpp
     app/GuiMessageReceiver.cpp
-    app/GmatNotebook.cpp
-    app/GmatServer.cpp
-    app/GmatTreeItemData.cpp
     app/GuiPlotReceiver.cpp
     app/InteractiveMatlabDialog.cpp
     app/MissionTreeItemData.cpp
+    app/ResourceTree.cpp
     app/RunScriptFolderDialog.cpp
-    app/ResourceTree.cpp
     app/ScriptPanel.cpp
     app/SetPathDialog.cpp
     app/TextEphemFileDialog.cpp
@@ -276,11 +276,12 @@
     rendering/GLStars.cpp
     rendering/GmatOpenGLSupport.cpp
     rendering/Light.cpp
-    rendering/Load3ds.cpp
-    rendering/LoadPOV.cpp
+    #rendering/Load3ds.cpp
+    #rendering/LoadPOV.cpp
     rendering/ModelManager.cpp
     rendering/ModelObject.cpp
     rendering/Rendering.cpp
+    rendering/ThreeDSLoader.cpp
     solarsys/BarycenterPanel.cpp
     solarsys/CelesBodySelectDialog.cpp
     solarsys/CelestialBodyOrbitPanel.cpp


Now we just need to get the plugins compiling
ryan88
 
Posts: 13
Joined: Fri Apr 19, 2013 11:16 am
Location: United Kingdom

Re: Could not find source file: asset/GroundStation.cpp

Postby ryan88 » Tue Apr 23, 2013 10:00 am

I have added CMakeLists.txt files for the EphemPropagator, Formation and Station plugins and they are now compiling. I have started a GitHub repository so that the changes I make can be easily tracked, you can find it here: https://github.com/ryan117/gmat
ryan88
 
Posts: 13
Joined: Fri Apr 19, 2013 11:16 am
Location: United Kingdom

Re: Could not find source file: asset/GroundStation.cpp

Postby djordan » Tue Apr 23, 2013 5:09 pm

Thanks ryan! I cloned from your github repo and was able to build successfully. I made a couple minor mods to fix an issue I ran into where the build was trying to build 64 bit, but link cspice 32 bit libraries. To summarize, the OPTION(64_BIT...) line in src/CMakeLists.txt didn't seem to work when setting it to ON, so I forced it to 'SET(64_BIT ON)' and it took. I'm experienced with git but new to cmake, so I'm not sure why the OPTION wasn't working...

I forked your repo and committed the change if you'd like to check it out and/or pull it in.

https://github.com/ddj116/gmat/

Thanks again! :D
djordan
 
Posts: 5
Joined: Fri Apr 20, 2012 7:44 pm

Next

Return to Compiling GMAT

Who is online

Users browsing this forum: No registered users and 1 guest

cron