-1

I'm using pocoXML functions in a managed DLL, which is used by another managed C++ project. The managed DLL compiles perfectly. But when calling a DLL-function which uses a poco function, I get a Debug Assertion Fail (is_block_type_valid) in debug_heap.cpp.

//managed DLL code:
#include "Poco/Timestamp.h"
#include "Poco/DateTimeFormatter.h"
#include "Poco/DateTimeFormat.h"

class  __declspec(dllexport) log
{
    public: 
        static void Log(const char* source, const char* file, const char* function, const std::string& str = "");
}       

void log::Debug(const char* file, const char* function, const std::string& str)
{   
    const Poco::Timestamp now;
    const std::string time = Poco::DateTimeFormatter::format(now, Poco::DateTimeFormat::ISO8601_FRAC_FORMAT);

    std::stringstream log;
    log << "[" << time.c_str() << "; Debug]: " << methodname(file, function) << " - " << str; 
    std::string str = log.str();      
    fprintf(stdout, "%s\n", str.c_str());
}

//call from managed C++:
log::Debug(__FILE__, __FUNCTION__, "message");

What am I doing wrong?

Thanks!

Stefan
  • 1
  • 3

1 Answers1

0

Seems, that Poco Lib was compiled for Windows SDK 8.1 instead of 10. A recompilation with right SDK set solved the problem.

Stefan
  • 1
  • 3