Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to extern variables from wrapper files without linking with them #613

Closed
IDKWNTCMF opened this issue Aug 4, 2023 · 0 comments · Fixed by #615
Closed

Trying to extern variables from wrapper files without linking with them #613

IDKWNTCMF opened this issue Aug 4, 2023 · 0 comments · Fixed by #615
Labels
bug Something isn't working

Comments

@IDKWNTCMF
Copy link
Collaborator

Description
Generated test headers extern wrapped functions and variables from generated wrapper files. However when Use stubs option is selected, sometimes we do not link with the corresponding wrapper file, so this results in error: undefined reference to {wrapper_name}.

To Reproduce
Steps to reproduce the behavior:

  1. Generate tests for curl project (file lib\timediff.c) with selected option Use stubs and curl target
  2. Try to run generated tests

Expected behavior
Tests are supposed to be executed successfully.

Actual behavior
An error test is generated with information about errors.

Visual proofs (screenshots, logs)

/home/utbot/curl/utbot_tests/makefiles/lib/../../../utbot_tests/lib/timediff_dot_c_test.h:687: error: undefined reference to 'curlx_mstotv_lib_timediff_c'
/home/utbot/curl/utbot_tests/makefiles/lib/../../../utbot_tests/lib/timediff_dot_c_test.h:691: error: undefined reference to 'curlx_tvtoms_lib_timediff_c'
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
@IDKWNTCMF IDKWNTCMF added the bug Something isn't working label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant