chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes

The next code is working properly in windows with Visual Studio 2019, but shows a link error in linux ubuntu 18.04 with gcc 7.5.0.

PRIVATE_WHEN_CALLED(_, au3DDriver::loadMetadata).Ignore();

This is the link error:

In function `Typemock::__try_when_called_indirect(void*, void*, unsigned char, char const*, char const*, ...)':

/home/MY_PATH/Isolator++/linux/include/IsolatorInternals.h:824: undefined reference to `Typemock::__when_called_indirect(void*, void*, unsigned char, char const*, char const*, void*, __va_list_tag (&) [1])'

collect2: error: ld returned 1 exit status

Other calls like WHEN_CALL() are working ok in windows and linux, so the project seems to be properly configured. I'm linking against the 64 bit libisolator.so version in linux.

Thanks

asked by benjamin-golden-race (1.1k points)

1 Answer

0 votes

Hi Benjamin,

Can you please give me the isolator++ version that installed in your machine.

Additionally, have you tried running our Examples that came with the installation?

If so, did they all pass? 

Otherwise, can you please run them and tell me the output?

Cheers,

Alon Sapozhnikov

Support Specialist.

answered by Alon_TypeMock (2.9k points)
*** Typemock Isolator++ Professional 4.1.2.20 (64bit) *** Documentation: https://www.typemock.com/docs?book=Ipp [==========] Running 72 tests from 23 test cases. [----------] Global test environment set-up. [----------] 2 tests from GlobalCMethods [ RUN ] GlobalCMethods.FakingReturnValueOnGlobalMethod [ OK ] GlobalCMethods.FakingReturnValueOnGlobalMethod (6 ms) [ RUN ] GlobalCMethods.FakingMethodAndUsingRecursiveFake [ OK ] GlobalCMethods.FakingMethodAndUsingRecursiveFake (0 ms) [----------] 2 tests from GlobalCMethods (6 ms total) [----------] 5 tests from ArgumentTests [ RUN ] ArgumentTests.UsingThe_MacroForShorthand [ OK ] ArgumentTests.UsingThe_MacroForShorthand (4 ms) [ RUN ] ArgumentTests.UsingTheANY_VALMacroForShorthand [ OK ] ArgumentTests.UsingTheANY_VALMacroForShorthand (39 ms) [ RUN ] ArgumentTests.UsingTheANY_REFMacroForShorthand [ OK ] ArgumentTests.UsingTheANY_REFMacroForShorthand (0 ms) [ RUN ] ArgumentTests.UsingRETToSimulateReturnedValue [ OK ] ArgumentTests.UsingRETToSimulateReturnedValue (47 ms) [ RUN ] ArgumentTests.ValidatingArgumentInSeparateMethod [ OK ] ArgumentTests.ValidatingArgumentInSeparateMethod (0 ms) [----------] 5 tests from ArgumentTests (90 ms total) [----------] 7 tests from AssertingInteraction [ RUN ] AssertingInteraction.AssertCallWasMadeOnDependency [ OK ] AssertingInteraction.AssertCallWasMadeOnDependency (0 ms) [ RUN ] AssertingInteraction.AssertCallWasMadeWithSpecificArgumentsOnDependency [ OK ] AssertingInteraction.AssertCallWasMadeWithSpecificArgumentsOnDependency (1 ms) [ RUN ] AssertingInteraction.AssertCallWasMadeWithSpecificArgumentsOnDependencyWithPredicates [ OK ] AssertingInteraction.AssertCallWasMadeWithSpecificArgumentsOnDependencyWithPredicates (0 ms) [ RUN ] AssertingInteraction.AssertCallWasNotMadeOnDependency [ OK ] AssertingInteraction.AssertCallWasNotMadeOnDependency (0 ms) [ RUN ] AssertingInteraction.TimesCalledMethodOnDependency [ OK ] AssertingInteraction.TimesCalledMethodOnDependency (0 ms) [ RUN ] AssertingInteraction.WasNotCalledWithConcreteOutParam [ OK ] AssertingInteraction.WasNotCalledWithConcreteOutParam (14 ms) [ RUN ] AssertingInteraction.WasCalledWithConcreteOutParam [ OK ] AssertingInteraction.WasCalledWithConcreteOutParam (0 ms) [----------] 7 tests from AssertingInteraction (15 ms total) [----------] 8 tests from AssertingNonPublicInteraction [ RUN ] AssertingNonPublicInteraction.AssertCallWasMadeOnDependency [ OK ] AssertingNonPublicInteraction.AssertCallWasMadeOnDependency (0 ms) [ RUN ] AssertingNonPublicInteraction.AssertCallWasNotMadeOnStaticDependency [ OK ] AssertingNonPublicInteraction.AssertCallWasNotMadeOnStaticDependency (1 ms) [ RUN ] AssertingNonPublicInteraction.TimesCalledMethodOnDependency [ OK ] AssertingNonPublicInteraction.TimesCalledMethodOnDependency (0 ms) [ RUN ] AssertingNonPublicInteraction.AssertOverloadCallWasMadeOnDependency [ OK ] AssertingNonPublicInteraction.AssertOverloadCallWasMadeOnDependency (0 ms) [ RUN ] AssertingNonPublicInteraction.AssertPrivateWithCondition [ OK ] AssertingNonPublicInteraction.AssertPrivateWithCondition (0 ms) [ RUN ] AssertingNonPublicInteraction.AssertPrivateWithConditionWasNotCalled [ OK ] AssertingNonPublicInteraction.AssertPrivateWithConditionWasNotCalled (0 ms) [ RUN ] AssertingNonPublicInteraction.AssertPrivateWithConditionWasCalledWithRet [ OK ] AssertingNonPublicInteraction.AssertPrivateWithConditionWasCalledWithRet (0 ms) [ RUN ] AssertingNonPublicInteraction.AssertPrivateWithConditionWasNotCalledWithRet [ OK ] AssertingNonPublicInteraction.AssertPrivateWithConditionWasNotCalledWithRet (0 ms) [----------] 8 tests from AssertingNonPublicInteraction (2 ms total) [----------] 3 tests from ChainsBehavior [ RUN ] ChainsBehavior.SettingChainedMethodsBehavior [ OK ] ChainsBehavior.SettingChainedMethodsBehavior (2 ms) [ RUN ] ChainsBehavior.SettingChainedMethodsBehaviorFakeAll [ OK ] ChainsBehavior.SettingChainedMethodsBehaviorFakeAll (0 ms) [ RUN ] ChainsBehavior.SettingChainedMethodsBehaviorLive [ OK ] ChainsBehavior.SettingChainedMethodsBehaviorLive (1 ms) [----------] 3 tests from ChainsBehavior (3 ms total) [----------] 2 tests from BehaviorSequencing [ RUN ] BehaviorSequencing.LastSequencedValueRemains [ OK ] BehaviorSequencing.LastSequencedValueRemains (0 ms) [ RUN ] BehaviorSequencing.MixingBehaviors [ OK ] BehaviorSequencing.MixingBehaviors (0 ms) [----------] 2 tests from BehaviorSequencing (0 ms total) [----------] 2 tests from CallConstructorTests [ RUN ] CallConstructorTests.CallPublicConstructorWithArguments [ OK ] CallConstructorTests.CallPublicConstructorWithArguments (0 ms) [ RUN ] CallConstructorTests.CallPrivateConstructorWithArguments [ OK ] CallConstructorTests.CallPrivateConstructorWithArguments (0 ms) [----------] 2 tests from CallConstructorTests (1 ms total) [----------] 1 test from CallOriginalBehavior [ RUN ] CallOriginalBehavior.ExecuteOriginalOnAFakeObject [ OK ] CallOriginalBehavior.ExecuteOriginalOnAFakeObject (0 ms) [----------] 1 test from CallOriginalBehavior (0 ms total) [----------] 3 tests from ChangeReturnValue [ RUN ] ChangeReturnValue.ReturnPrimitive [ OK ] ChangeReturnValue.ReturnPrimitive (0 ms) [ RUN ] ChangeReturnValue.ReturnString [ OK ] ChangeReturnValue.ReturnString (1 ms) [ RUN ] ChangeReturnValue.ReturnObject [ OK ] ChangeReturnValue.ReturnObject (0 ms) [----------] 3 tests from ChangeReturnValue (1 ms total) [----------] 4 tests from Conditional [ RUN ] Conditional.ReplacingStaticMethodCallBasedOnParameters [ OK ] Conditional.ReplacingStaticMethodCallBasedOnParameters (0 ms) [ RUN ] Conditional.ReplacingStaticMethodCallBasedOnParametersWithPredicates [ OK ] Conditional.ReplacingStaticMethodCallBasedOnParametersWithPredicates (0 ms) [ RUN ] Conditional.ReplacingMethodCallBasedOnParameters [ OK ] Conditional.ReplacingMethodCallBasedOnParameters (1 ms) [ RUN ] Conditional.ReplacingPrivateMethodCallBasedOnParameters [ OK ] Conditional.ReplacingPrivateMethodCallBasedOnParameters (0 ms) [----------] 4 tests from Conditional (1 ms total) [----------] 1 test from CreateRecursiveFake [ RUN ] CreateRecursiveFake.ReturnFakeObject [ OK ] CreateRecursiveFake.ReturnFakeObject (0 ms) [----------] 1 test from CreateRecursiveFake (0 ms total) [----------] 3 tests from DoInstead [ RUN ] DoInstead.ReplacingStaticMethodCallBasedOnParameters [ OK ] DoInstead.ReplacingStaticMethodCallBasedOnParameters (0 ms) [ RUN ] DoInstead.ReplacingInstanceMethodCallBasedOnOrder [ OK ] DoInstead.ReplacingInstanceMethodCallBasedOnOrder (1 ms) [ RUN ] DoInstead.ChangeBehaviorToGlobalFunctionWithContext [ OK ] DoInstead.ChangeBehaviorToGlobalFunctionWithContext (0 ms) [----------] 3 tests from DoInstead (1 ms total) [----------] 7 tests from FakingAnOutParams [ RUN ] FakingAnOutParams.MakeITransportUsable [ OK ] FakingAnOutParams.MakeITransportUsable (0 ms) [ RUN ] FakingAnOutParams.InPublicMethodCall [ OK ] FakingAnOutParams.InPublicMethodCall (0 ms) [ RUN ] FakingAnOutParams.InPublicMethodCallWithCondition [ OK ] FakingAnOutParams.InPublicMethodCallWithCondition (0 ms) [ RUN ] FakingAnOutParams.InPrivateMethodCall [ OK ] FakingAnOutParams.InPrivateMethodCall (0 ms) [ RUN ] FakingAnOutParams.InPrivateMethodCallWithCondition [ OK ] FakingAnOutParams.InPrivateMethodCallWithCondition (1 ms) [ RUN ] FakingAnOutParams.InPrivateMethodCallWithConditionWithoutAssigment [ OK ] FakingAnOutParams.InPrivateMethodCallWithConditionWithoutAssigment (0 ms) [ RUN ] FakingAnOutParams.AnArrayInPublicMethodCall [ OK ] FakingAnOutParams.AnArrayInPublicMethodCall (7 ms) [----------] 7 tests from FakingAnOutParams (8 ms total) [----------] 7 tests from FakingNonPublicMethods [ RUN ] FakingNonPublicMethods.ChangingBehaviorOfPrivateMethod [ OK ] FakingNonPublicMethods.ChangingBehaviorOfPrivateMethod (1 ms) [ RUN ] FakingNonPublicMethods.ChangingBehaviorOfPrivateOverloadedMethod [ OK ] FakingNonPublicMethods.ChangingBehaviorOfPrivateOverloadedMethod (0 ms) [ RUN ] FakingNonPublicMethods.AssertingPrivateMethodCall [ OK ] FakingNonPublicMethods.AssertingPrivateMethodCall (0 ms) [ RUN ] FakingNonPublicMethods.AssertingOverloadedPrivateMethodCall [ OK ] FakingNonPublicMethods.AssertingOverloadedPrivateMethodCall (0 ms) [ RUN ] FakingNonPublicMethods.AssertingOverloadedPrivateMethodCallWithMatchingArgumetns [ OK ] FakingNonPublicMethods.AssertingOverloadedPrivateMethodCallWithMatchingArgumetns (1 ms) [ RUN ] FakingNonPublicMethods.OutParametersInPrivateMethodCall [ OK ] FakingNonPublicMethods.OutParametersInPrivateMethodCall (0 ms) [ RUN ] FakingNonPublicMethods.OutParametersInPrivateMethodCallWithPredicate [ OK ] FakingNonPublicMethods.OutParametersInPrivateMethodCallWithPredicate (0 ms) [----------] 7 tests from FakingNonPublicMethods (2 ms total) [----------] 3 tests from FakeStaticMethods [ RUN ] FakeStaticMethods.ReturningAFakeObjectFromAFactoryMethod [ OK ] FakeStaticMethods.ReturningAFakeObjectFromAFactoryMethod (0 ms) [ RUN ] FakeStaticMethods.FakingAllStaticMethodsOnAType [ OK ] FakeStaticMethods.FakingAllStaticMethodsOnAType (0 ms) [ RUN ] FakeStaticMethods.IgnoringPrivateStaticMethod [ OK ] FakeStaticMethods.IgnoringPrivateStaticMethod (1 ms) [----------] 3 tests from FakeStaticMethods (1 ms total) [----------] 2 tests from FutureObjectTests [ RUN ] FutureObjectTests.FakingTheSingletonObjectAndChangingBehavior [ OK ] FutureObjectTests.FakingTheSingletonObjectAndChangingBehavior (0 ms) [ RUN ] FutureObjectTests.FakingTheSingletonObjectAndAssertingMethodCalls [ OK ] FutureObjectTests.FakingTheSingletonObjectAndAssertingMethodCalls (0 ms) [----------] 2 tests from FutureObjectTests (0 ms total) [----------] 1 test from Ignore [ RUN ] Ignore.IgnoreThrowingMethodOnLiveObject [ OK ] Ignore.IgnoreThrowingMethodOnLiveObject (0 ms) [----------] 1 test from Ignore (0 ms total) [----------] 1 test from InvokeMember [ RUN ] InvokeMember.CallStaticPrivateMethod [ OK ] InvokeMember.CallStaticPrivateMethod (0 ms) [----------] 1 test from InvokeMember (0 ms total) [----------] 3 tests from LiveObjectTests [ RUN ] LiveObjectTests.FakingAPublicMethod [ OK ] LiveObjectTests.FakingAPublicMethod (0 ms) [ RUN ] LiveObjectTests.AssertingACall [ OK ] LiveObjectTests.AssertingACall (1 ms) [ RUN ] LiveObjectTests.FakingAPrivateMethod [ OK ] LiveObjectTests.FakingAPrivateMethod (0 ms) [----------] 3 tests from LiveObjectTests (1 ms total) [----------] 2 tests from PureVirtualTests [ RUN ] PureVirtualTests.FakingAPureVirutualMethodAndChangingBehavior [ OK ] PureVirtualTests.FakingAPureVirutualMethodAndChangingBehavior (0 ms) [ RUN ] PureVirtualTests.FakingAPureVirutualMethodAndAssertingMethodCalls [ OK ] PureVirtualTests.FakingAPureVirutualMethodAndAssertingMethodCalls (0 ms) [----------] 2 tests from PureVirtualTests (0 ms total) [----------] 1 test from ReturnByValueTests [ RUN ] ReturnByValueTests.ReturnLocations [ OK ] ReturnByValueTests.ReturnLocations (0 ms) [----------] 1 test from ReturnByValueTests (0 ms total) [----------] 3 tests from SettingMembersTests [ RUN ] SettingMembersTests.SetPrivateInstanceMember [ OK ] SettingMembersTests.SetPrivateInstanceMember (0 ms) [ RUN ] SettingMembersTests.SetPrivateStaticMember [ OK ] SettingMembersTests.SetPrivateStaticMember (0 ms) [ RUN ] SettingMembersTests.GetPrivateArray [ OK ] SettingMembersTests.GetPrivateArray (0 ms) [----------] 3 tests from SettingMembersTests (1 ms total) [----------] 1 test from ThrowException [ RUN ] ThrowException.FakeStdException [ OK ] ThrowException.FakeStdException (0 ms) [----------] 1 test from ThrowException (0 ms total) [----------] Global test environment tear-down [==========] 72 tests from 23 test cases ran. (133 ms total) [ PASSED ] 72 tests.

Hi Benjamin,

Can you please open a new ticket on our premium support.

Add all the relevant information from both this Q&A and the other one you opened.

Additionally, please create a sample projects that reproduces the issues so we could dig into it.

Cheers,

Alon Sapozhnikov

Support Specialist.

...