PoL0 / crunch

Automatically exported from code.google.com/p/crunch
Other
0 stars 0 forks source link

not inline code in crn_decomp.h #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

error LNK2005: "bool __cdecl crnd::crnd_validate_file(void const *,unsigned 
int,struct crnd::crn_file_info *)" 
(?crnd_validate_file@crnd@@YA_NPBXIPAUcrn_file_info@1@@Z) already defined

error LNK2005: "bool __cdecl crnd::crnd_get_texture_info(void const *,unsigned 
int,struct crnd::crn_texture_info *)" 
(?crnd_get_texture_info@crnd@@YA_NPBXIPAUcrn_texture_info@1@@Z) already defined

and more more more

if I include this file in many cpp

Original issue reported on code.google.com by levchenk...@gmail.com on 30 Apr 2014 at 12:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I believe this not an error in the library -- the intended usage for 
crn_decomp.h is to include it in a single source file, and then #define 
CRND_HEADER_FILE_ONLY before including it in any other cpp files. This is 
because crn_decomp.h contains both the implementation and the header in one 
file.

Original comment by da...@wolfire.com on 25 Feb 2015 at 11:08