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

Multiple linker errors in VisualStudio #37

Closed
GoogleCodeExporter opened this issue May 21, 2015 · 1 comment
Closed

Multiple linker errors in VisualStudio #37

GoogleCodeExporter opened this issue May 21, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.Create new console project in VisualStudio2012
2.Add miniz.c and main.c
3.Addd "#include 'miniz.c' " before "main" function

What is the expected output? What do you see instead?
Expected-compilation success.Instead I am getting:

1>miniz.obj : error LNK2005: _mz_zip_reader_extract_to_mem_no_alloc already 
defined in main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_file_stat already defined in 
main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_get_filename already defined in 
main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_get_num_files already defined in 
main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_init already defined in main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_init_file already defined in 
main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_init_mem already defined in main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_is_file_a_directory already defined 
in main.obj
1>miniz.obj : error LNK2005: _mz_zip_reader_is_file_encrypted already defined 
in main.obj

etc.. 

Also,if I use prebuilt VS project which come with the library,it compiles and 
works fine.The problem only appears in a new project.

What version of the product are you using? On what operating system?

Windows7 64bit  VisualStudio 2012


Please provide any additional information below.


Original issue reported on code.google.com by michael....@idomoo.com on 14 Oct 2014 at 1:23

@GoogleCodeExporter
Copy link
Author

Ok,please discard the issue.I excluded the miniz.c from the build and it 
compiled.

Original comment by michael....@idomoo.com on 14 Oct 2014 at 1:38

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

No branches or pull requests

2 participants