Discussion:
[Cucumber] (CPP) Compiling with static runtime library gives one linker error on gtestd.lib
(too old to reply)
m***@g.rit.edu
2018-07-09 15:49:04 UTC
Permalink
I have a project compiled with a static runtime library (Multi-threaded
Debug (/MTd) on visual studio).
To avoid the need to recompile the whole project (which is very large) I
want to compile cucumber, boost, gtest and step definitions with the same
runtime library.
After all is done I have one remaining linker error. I believe it is
because a function used is not defined in the static version of the gtest
library. It works perfect on the VS dynamic runtime library.

The linker error:
LNK2001 unresolved external symbol "protected: virtual class
cucumber::internal::InvokeResult const __thiscall
cucumber::internal::GTestStep::invokeStepBody(void)"
(?***@GTestStep@***@cucumber@@MAE?***@23@XZ)

I believe it happens in this driver file:
https://github.com/cucumber/cucumber-cpp/blob/master/src/drivers/GTestDriver.cpp.
I tried getting the newest gtestd.lib and it did not fix the issue.

Do you have any thoughts on this? Have you seen it happen and how did you
fix it?
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
m***@g.rit.edu
2018-07-13 12:20:03 UTC
Permalink
I fixed this in the time between posting the question and now. It is a
simple, yet "non-elegant" solution. Including the GTestDriver.cpp to your
working project fixes it.
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...