Hello!
I assume that you have turned on the cmake switch OGDF_USE_ASSERT_EXCEPTIONS
, which causes OGDF_ASSERT
to contain calls of ogdf::get_stacktrace()
.
However, your linker cannot find the get_stacktrace()
function. Because of that, code that uses OGDF_ASSERT
does not link correctly.
(However, the examples that do not contain OGDF_ASSERT
link correctly.)
The code that defines get_stacktrace()
is in src/ogdf/external/backward.cpp
. You lib/dll file does not seem to contain that code…
I have an idea for potential fix: Does it help when you add OGDF_EXPORT
in front of the declaration of get_stacktrace()
(include/ogdf/basic/basic.h
, line 131)?
It should look like this:
OGDF_EXPORT extern void get_stacktrace(std::ostream &);
Does that help?
Best regards,
Dagobert
Hello again Licheng Zhang,
I was able to replicate the linker error, but for me it was fixed by the OGDF_EXPORT
(I also added the name of the parameter stream
but I don’t think that should make a difference).
OGDF_EXPORT extern void get_stacktrace(std::ostream &stream);
The test test-assert also had a little bug where two variables were declared as int even though they are bools. But that is only a problem with that specific test and not with the rest library or the examples.
My only other suggestion is to make sure that you recompile the OGDF library after adding the OGDF_EXPORT
. Other than that, I’m afraid I don’t know why your lib/dll file would not contain the definition of get_stacktrace()
.
Best regards,
Dagobert
--
You received this message because you are subscribed to a topic in the Google Groups "ogdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ogdf/oyNe4MJNCPo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ogdf+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ogdf/f1a18302-5234-471d-8d91-59bf83a200f1n%40googlegroups.com.