shiyilei / protobuf-c

Automatically exported from code.google.com/p/protobuf-c
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Build fails on VS2010: void* unknown size, no such file protobuf-c.h #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download protobuf-c v.0.15
2. Use CMake to configure for VS2010
3. Create file protobuf-c-config.h.in to fix issue #66.  Include a line  
"#define inline __inline" because VS2010 doesn't implement C99.
4. Build.

What is the expected output? What do you see instead?

The build fails with 6 errors:

Error   2   error C2036: 'void *' : unknown 
size    E:\src\ProtocolBuffers\protobuf-c-0.15\src\google\protobuf-c\protobuf-c.c   6
29  1   protobuf-c-static
Error   6   error C2036: 'void *' : unknown 
size    E:\src\ProtocolBuffers\protobuf-c-0.15\src\google\protobuf-c\protobuf-c.c   6
29  1   protobuf-c-shared
Error   9   error C1083: Cannot open include file: 
'google/protobuf-c/protobuf-c.h': No such file or 
directory   E:\src\ProtocolBuffers\protobuf-c-0.15\build\test-generated-code\gener
ated-code\test.pb-c.h   6   1   test-generated-code
Error   10  error C1083: Cannot open include file: 
'google/protobuf-c/protobuf-c.h': No such file or 
directory   e:\src\protocolbuffers\protobuf-c-0.15\build\test-generated-code\gener
ated-code\test.pb-c.h   6   1   test-generated-code
Error   11  error C1083: Cannot open include file: 
'google/protobuf-c/protobuf-c.h': No such file or 
directory   E:\src\ProtocolBuffers\protobuf-c-0.15\build\test-generated-code2\gene
rated-code\test-full.pb-c.h 6   1   test-generated-code2
Error   12  error C1083: Cannot open include file: 
'google/protobuf-c/protobuf-c.h': No such file or 
directory   e:\src\protocolbuffers\protobuf-c-0.15\build\test-generated-code2\gene
rated-code\test-full.pb-c.h 6   1   test-generated-code2

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

Version 0.15, windows 7 (64 bits), Visual Studio 2010.  

Please provide any additional information below.

Note that I configured for a 32-bit target in cmake.

Original issue reported on code.google.com by srobbin...@gmail.com on 23 Aug 2011 at 7:12

GoogleCodeExporter commented 8 years ago
The first two errors can be fixed by changing fixed64_pack arguments to:

static inline size_t
fixed64_pack (uint64_t value, char *out)

Original comment by srobbin...@gmail.com on 23 Aug 2011 at 7:14

GoogleCodeExporter commented 8 years ago
Forgot Step 1.5: remove "include(CPack)" from top-level CMakeLists.txt.  It is 
a fatal error if you don't have cpack.

Original comment by srobbin...@gmail.com on 23 Aug 2011 at 7:23

GoogleCodeExporter commented 8 years ago
thanks srobbins99: comment #1 applied; not sure about include(CPack).

Original comment by lahike...@gmail.com on 2 Nov 2011 at 2:33