1

I realise that there are a few questions on SO regarding this, but none of them seem to answer my query...

I am getting a compile error that says:

error LNK2019: unresolved external symbol "private: void_thiscall STRManager_Module::publishSteerDataToIDU(int, class CUserFlightPlan *, bool)"...

The error is not giving a specific line that it's complaining about, just the file: STRManager_Module.obj- it's not stating that it's in a .cpp file...

I am calling the function mentioned in the error inside another function in the same .cpp file as where that one is defined:

void STRManager_Module::ExecSteerCycle(){
    if(elapsedSIMTime > 0.01 && StandbyNAVMode == false){
        ...
        if(this->InterCDNUSteerData.SteerMode == this->PreviousSteerMode){
            ...
            publishSteerDataToIDU(flightPlanSize, lpFP, maintainHeading);
            ...
            publishSteerDataTrackToIDU(flightPlanSize, lpFP, &aircraftTrack, &calculateForApproachTrack, maintainHeading);
        }
    ...
    }
...
}

The publishSteerDataToIDU(int, class CUserFlightPlan *, bool) function is defined in the header file with:

void publishSteerDataToIDU(int FlightPlanSize, CUserFlightPlan *lpFP, bool maintainHeading = false);

As far as I can tell, I have passed the correct number & types of parameters to the function when calling it- it all matches the definition in the header file... Why am I getting this compile error? Is there something I'm missing here?

I also get another compile error stating: error LNK1120: 1 unresolved externals...

Noble-Surfer
  • 3,052
  • 11
  • 73
  • 118
  • The `publishSteerDataToIDU` functions is **declared** (the signature ends with semicolon), not **defined** - and the error shows you that this function isn't defined anywhere. – Ethouris Apr 17 '15 at 11:15

0 Answers0