bugCERTI - Bugs: bug #47570, Compilation error due to include...

 
 

bug #47570: Compilation error due to include of RTI.hh in hla13/NullFederateAmbassador.hh (using hla13)

Submitter:  JbCh <jb_ch>
Submitted:  Wed 30 Mar 2016 09:16:25 AM UTC
   
 
Category:  CERTI Severity:  * 3 - Normal
Item Group:  Compilation error Status:  Fixed
Privacy:  Public Assigned to:  jb_ch
Open/Closed:  Closed Release:  * GIT-master
Reproducibility:  Once Fixed Release:  * GIT-master
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 Mar 2016 01:37:16 PM UTC, comment #3: 

Just for completion, I tested it with:
- CERTI v3.5.1
- Fedora 23 64 bits (4.4.2-301.fc23.x86_64)
- g++ (GCC) 5.3.1
- GNU Make 4.0

JbCh <jb_ch>
Group administrator
Wed 30 Mar 2016 01:34:29 PM UTC, comment #2: 

Well...(As usual) you are right!

I had an old project (using older CERTI version) from Pierre (Siron) with makefile.
I thought I did the modification you describe (inluding the additional "hla13" in the include path) but it looks like I forgot to save the makefile file.

So, I tested again with the modification in the makefile command:
-----------------------------------
all :
g++ -o My_Federate My_Federate.cc \
-L$(CERTI_HOME)/lib -lRTI-NGd -lCERTId -lFedTimed -DRTI_USES_STD_FSTREAM \
-I$(CERTI_HOME)/include/hla13
----------------------------------

Then I compiled using:

>> source ~/certi-3.5.1-install/share/scripts/myCERTI_env.sh
>> make


And it works! Therefore, I believe that my bad was a not saved makefile.

Many thanks for the feedback Erk :)
I am closing this topic but at least it can be used as documentation for people who try to migrate project from older CERTI versions.

I am changing status to fixed.

JbCh <jb_ch>
Group administrator
Wed 30 Mar 2016 11:22:31 AM UTC, comment #1: 

Hi JB,

This is strange. In your compilation argument either Makefile or CMakeLists.txt you should end-up wiht a CXXFLAGS which includes:

-I<certiInstallPath>/include/hla13

which should make

#include <RTI.hh>
or
#include "RTI.hh"

succeed.

Are compiling with custom makefiles or are you using CMake ?
Could you copy/paste the complete compile command line which is failing?

Eric NOULARD <erk>
Group administrator
Wed 30 Mar 2016 09:16:25 AM UTC, original submission:  

I am reporting an error I observed during development.

In CERTI install folder, the structure of the include files has changed for compatibility reasons with the different standard (1.3, 1516, 1516_2010). Therefore the include structure contains subfolders:
1) $CERTI_HOME/include/hla13
2) $CERTI_HOME/include/ieee1516-2000/RTI
3) $CERTI_HOME/include/ieee1516-2010/RTI

I was trying to compile a federation and I got an error mentioning that RTI.hh file was missing for the include the NullFederateAmbassador.hh.

I had to change line 6 in the file NullFederateAmbassodor in
$CERTI_HOME/include/hla13

from:
#include <RTI.hh>

to:
#include <hla13/RTI.hh>

I don't know if this is relevant but if my issue could help someone, that's good :) I am assigning it to me for now. Please let me know if anyone has comment or input on this topic.

Note:
I believe there is an inconsistency in these includes because fedtime.hh includes RTI.hh (line 6) with:
#include "RTI.hh"


JbCh <jb_ch>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by erk (Posted a comment)
  • -email is unavailable- added by jb_ch (Submitted the item)
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-30 jb_ch Open/ClosedOpen Closed
    2016-03-30 jb_ch StatusWorks For Me Fixed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code