jeudi 26 mai 2016

Type 'uint32_t' could not be resolved

I am working on a C++ program in Eclipse (3.8.1) CDT. I am using the gcc compiler on Debian 8. I'm also using an open source library called opendnp3 written in C++, which requires uint32_t to resolve as it's a parameter in several method calls and constructors.

The type is defined in which resolves as one of my includes. I can open the declaration and clearly see 'using ::uint32_t;' in there.

In my searching, I've added -std=c++11 to 'All options' under 'C/C++ Build --> Settings -> Tool Settings -> GCC C++ Compiler' and I've also rebuilt the project index and restarted Eclipse, but it still doesn't resolve. I assume I've added it correctly, but not sure how to make sure:

CDT Settings Screenshot:

Here's the code so far:

#include <asiodnp3/DNP3Manager.h>
#include <asiodnp3/PrintingSOEHandler.h>
#include <asiodnp3/ConsoleLogger.h>
#include <asiodnp3/MeasUpdate.h>
#include <asiopal/UTCTimeSource.h>
#include <opendnp3/outstation/SimpleCommandHandler.h>
#include <opendnp3/outstation/IDatabase.h>
#include <opendnp3/LogLevels.h>
#include <string>
#include <thread>
#include <iostream>
#include <cstdint> //uint32_t

using namespace std;
using namespace openpal;
using namespace asiopal;
using namespace asiodnp3;
using namespace opendnp3;


int main() {

    const uint32_t FILTERS = levels::NORMAL | levels::ALL_COMMS;
    DNP3Manager manager(1, ConsoleLogger::Create());

    // Create a TCP server (listener)
    //auto channel = manager.AddTCPServer("server", FILTERS, ChannelRetry::Default(), "0.0.0.0", 20000);

}

Aucun commentaire:

Enregistrer un commentaire