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

MVSC linking error multiple modules - How do I reuse a fake across multiple test-suites? #96

Open
CallistorrB opened this issue Jan 4, 2021 · 2 comments

Comments

@CallistorrB
Copy link

Hi,

Is there any solution for using multiple modules across multiple test-suites for MVSC?
I'm getting linking error with MVSC linker, with clang I use ((weak)).
Is there any equivalent for ((weak)) while linking with MVSC linker?
I'm using Clang 7.0 and MVSC 14.16 linker(link.exe).

fake.h
DECLARE_FAKE_VALUE_FUNC3(int, seek, int, long, int);
fake.c
DEFINE_FAKE_VALUE_FUNC3(int, seek, int, long, int);

error LNK2005: seek already defined in fake.lib(fake.c.1.o)

Thanks.

@cakira
Copy link

cakira commented Jun 22, 2021

I don't use MSVC, but could this link be useful?

https://stackoverflow.com/a/11529277/1669975

@tohsaka888
Copy link

MinGW has the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants