Noxious
Noxious

Reputation: 87

Errors at implementation of SymbolicC++ into existing solution

i'm trying to integrate the SymbolicC++ Library into an already existing solution. My specifications are as followed: Visual Studio 2010 RTM on a Windows 7 OS.

Now my problem:

I already have a solution where I want to integrate a function with symblic variables. There is another previously integrated library (The OMPL "Open Motion Planning Library). If i try to include the symbolicc++.h it fails to compile the solution by these errors:

Error 10 error C2825: '_Fty': must be a class or namespace when followed by '::' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 28`

Error 11 error C2903: 'result' : symbol is neither a class template nor a function template c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 28

Error 12 error C2039: 'result' : is not a member of '`global namespace'' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 28

Error 13 error C2143: syntax error : missing ';' before '<' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 28

Error 14 error C2039: 'type' : is not a member of '`global namespace'' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 28

Error 15 error C2238: unexpected token(s) preceding ';' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 28

Error 16 error C2039: '_Type' : is not a member of 'std::tr1::_Result_type2<__formal,_Fty,_Arg0,_Arg1>' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 40

Error 17 error C2146: syntax error : missing ';' before identifier '_Type' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 40

Error 18 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 40

Error 19 error C2602: 'std::tr1::_Result_of2<_Fty,_Farg0,_Farg1>::_Type' is not a member of a base class of 'std::tr1::_Result_of2<_Fty,_Farg0,_Farg1>' c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 40

Error 20 error C2868: 'std::tr1::_Result_of2<_Fty,_Farg0,_Farg1>::_Type' : illegal syntax for using-declaration; expected qualified-name c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xxresult 40

Error 21 error C2678: binary '==' : no operator found which takes a left-hand operand of type 'std::tr1::_Bind_fty<_Fty,_Ret,_BindN>' (or there is no acceptable conversion) D:\Software\RobotKitV3.0\SensorPluginMotionPlanner\Zusatz\ompl_4_RK\RK_ServerSensor_ompl\RK_ServerSensor_ompl\ServerSensor_ompl.cpp 2587

I am quite sure there is some issue between the two libraries. But i'm not getting it to work properly. There is one line (which is referred to the Error 21), when I change it from this:

if(bind(serverSocket, (sockaddr*) &addressServer, sizeof(addressServer)) == SOCKET_ERROR)

To this:

if(::bind(serverSocket, (sockaddr*) &addressServer, sizeof(addressServer)) == SOCKET_ERROR)

I don't have these errors anymore! But when i try to start the .exe it fails with this error:

The application was unable to start correctly (0xc000007b). Click OK to close the application

unless i exclude the line:

#include <symbolicc++.h>

Has somebody an idea to get this work? It's so frustrating that i try to implement the symbolicc++.h since 5 days and can't execute my solution.

Edit:

So I made some progress. If I just comment out everything except this code below there is no error anymore.

#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <windows.h>
#include <winsock.h>
#include <fstream>
#include <iostream>
#include <string>
#include <WinBase.h>

#include "..\..\SymbolicC++\include\symbolicc++.h"

#include "ServerSensor_ompl.h"

#include <ompl/base/SpaceInformation.h>
#include <ompl/base/spaces/SE3StateSpace.h>
#include <ompl/base/spaces/SE2StateSpace.h>
#include <ompl/base/spaces/SO2StateSpace.h>
#include <ompl/geometric/planners/rrt/RRTConnect.h>
#include <ompl/geometric/SimpleSetup.h>
#include <ompl/config.h>
#include <ompl/geometric/planners/rrt/RRT.h>
#include <ompl/geometric/planners/rrt/RRTConnect.h>
#include <ompl/geometric/planners/rrt/RRTStar.h>

Symbolic Test("Test");

namespace ob = ompl::base;
namespace og = ompl::geometric;

namespace ob_Con_WP = ompl::base;
namespace og_Con_WP = ompl::geometric;

namespace ob_Con_RC = ompl::base;       // Robot_Cell
namespace og_Con_RC = ompl::geometric;  // Robot_Cell

WSADATA wsa;
struct sockaddr_in addressServer;
int commSocket, serverSocket;

bool RK_active = true;

int m_bufferLength = 0;
int m_bufferLength2 = 0;

const size_t BufferSize = 100000;
char m_buffer[BufferSize];
char m_buffer2[BufferSize];

int Trial_Cart = 0;
int Trial_Joint = 0;
int Trial_Constraint_WP = 0;
int Trial_Constraint_RC = 0;
int Trial_General = 0;

bool Have_Exact_Solution;
std::fstream f;

int countCalls = 0;
int countCallLimit = 1000;

double Constraint_Bounds[2][6];

ob::StateSpacePtr space_Joint(new ob::RealVectorStateSpace(6));
ob::StateSpacePtr space_Cart(new ob::SE3StateSpace);

ob_Con_WP::StateSpacePtr space_Constraint_WP(new ob_Con_WP::RealVectorStateSpace(6));

ob_Con_RC::StateSpacePtr space_Constraint_RC(new ob_Con_RC::RealVectorStateSpace(6));
ob_Con_RC::SpaceInformationPtr si(new ob_Con_RC::SpaceInformation(space_Constraint_RC));

int _tmain(int argc, _TCHAR* argv[])
{   
    std::cout << "OMPL version: " << OMPL_VERSION << std::endl;
    std::cout << std::endl << std::endl;
    system("pause");
}

But for example if I try to put this line below into my code the same error (0xc000007B) occurs when I try to execute.

og::SimpleSetup ss_Cart(space_Cart);

Upvotes: 2

Views: 302

Answers (0)

Related Questions