referenced in function _main

now I have new errors relate to linker such as
unresolved external symbol "public: bool __thiscall BCI2000Remote::GetControlSignal(int,int,double &)" (?GetControlSignal@BCI2000Remote@@QAE_NHHAAN@Z) referenced in function _main

here it is code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Remote_test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "BCI2000Remote.h"
#include <string>
#include <vector>
#include <iostream>
using namespace std;
int _tmain(int argc, TCHAR* argv[100])
{
	// Instantiate a BCI2000Remote object
  BCI2000Remote bci;
  // Assume that Operator executable resides in the same directory as this program.
  std::string path = ( argc > 0 ) ? argv[0] : "";
  size_t pos = path.find_last_of( "\\/" );
  path = ( pos != std::string::npos ) ? path.substr( 0, pos + 1 ) : "";
  // Start the Operator module, and connect
  bci.OperatorPath( path + "Operator" );
  if( !bci.Connect() )
  {
    std::cerr << bci.Result();
    return -1;
  }
  // Startup modules
  const char* modules[] = { "SignalGenerator --LogMouse=1", "ARSignalProcessing", "CursorTask" };
  std::vector<std::string> vModules( &modules[0], &modules[0] + sizeof( modules ) / sizeof( *modules ) );
  if( !bci.StartupModules( vModules ) )
  {
    std::cerr << bci.Result();
    return -1;
  }
  // Load a parameter file, and set subject information
  bci.LoadParametersRemote( "../parms/examples/CursorTask_SignalGenerator.prm" );
  bci.SubjectID( "SUB" );
  // Start a run
  if( !bci.Start() )
  {
    std::cerr << bci.Result();
    return -1;
  }
  // Print feedback signal
  std::string state;
  while( bci.GetSystemState( state ) && state == "Running" )
  {
    double value = 0;
    bci.GetControlSignal( 1, 1, value );
    std::cout << "Control signal: " << value << ", press Enter to proceed" << std::flush;
    std::string line;
    std::getline( std::cin, line );
  }
	return 0;
}






here it is source of header file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef BCI2000_REMOTE_H
#define BCI2000_REMOTE_H

#include <vector>
#include <string>
#include "BCI2000Connection.h"

class BCI2000Remote : public BCI2000Connection
{
 public:
  // To establish and terminate a connection, use members inherited from
  // BCI2000Connection.
  //
  // BCI2000Remote adds the following members:
  // Properties representing recording information.
  const std::string& SubjectID() const { return mSubjectID; }
  BCI2000Remote& SubjectID( const std::string& );
  const std::string& SessionID() const { return mSessionID; }
  BCI2000Remote& SessionID( const std::string& );
  const std::string& DataDirectory() const { return mDataDirectory; }
  BCI2000Remote& DataDirectory( const std::string& );
  // Start BCI2000 core modules, listed by executable name, including possible
  // command line arguments.
  bool StartupModules( const std::vector<std::string>& );
  // Load parameters from a file, relative to the current working directory.
  bool LoadParametersLocal( const std::string& );
  // Load parameters from a file, relative to BCI2000's working directory.
  bool LoadParametersRemote( const std::string& );
  // Apply parameters, start, and stop the system.
  bool SetConfig();
  bool Start();
  bool Stop();
  // Access information during online operation.
  bool GetSystemState( std::string& );
  bool GetControlSignal( int, int, double& );
  // Parameters and States
  bool SetParameter( const std::string& name, const std::string& value );
  bool GetParameter( const std::string& name, std::string& value );
  bool AddStateVariable( const std::string& name, unsigned int bitWidth, double initialValue );
  bool SetStateVariable( const std::string&, double );
  bool GetStateVariable( const std::string&, double& );
  // Set event scripts.
  bool SetScript( const std::string&, const std::string& );
  bool GetScript( const std::string&, std::string& );

 private:
  bool WaitForSystemState( const std::string& );
  bool SimpleCommand( const std::string& );
  std::string EscapeSpecialChars( const std::string& );

  std::string mSubjectID,
              mSessionID,
              mDataDirectory;
};

#endif // BCI2000_REMOTE_H
Has the GetControlSignal function been implemented?
I don't see a definition of GetControlSignal anywhere in the code you've posted. You've declared it as a method in line 35 of BCI2000_Remote.h, but nowhere do I see the code for what it actually does.
its complaining that it cant find a function body for GetControlSignal(int,int,double &);


if you have defined it, check that the parameters are of the same type in the same order.


Topic archived. No new replies allowed.