Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Inherited Code

$
0
0

Greetings,

I am a Java developer who has inherited some legacy code. There is a JNI component that I'm trying to build. After getting all the dependencies resolved, I tried to build and got the following errors:


1>------ Build started: Project: jni_system, Configuration: Debug Win32 ------
1>  stdafx.cpp
1>\include\c\sys\types.h(84): error C2371: 'ptrdiff_t' : redefinition; different basic types
1>          vc\include\crtdefs.h(436) : see declaration of 'ptrdiff_t'
1>\include\c\sys\types.h(98): error C2371: 'wctype_t' : redefinition; different basic types
1>          vc\include\crtdefs.h(448) : see declaration of 'wctype_t'
1>\include\c\sys\types.h(107): error C2371: 'fpos_t' : redefinition; different basic types
1>          vc\include\stdio.h(145) : see declaration of 'fpos_t'
1>\include\c\sys\types.h(124): error C2371: 'time_t' : redefinition; different basic types
1>          vc\include\crtdefs.h(486) : see declaration of 'time_t'
1>\include\c\sys\types.h(131): error C2371: 'clock_t' : redefinition; different basic types
1>          vc\include\time.h(82) : see declaration of 'clock_t'
1>\include\c\sys\types.h(136): error C2371: 'size_t' : redefinition; different basic types
1>          \jni_system\predefined c++ types (compiler internal)(19) : see declaration of 'size_t'
1>\include\c\sys\types.h(204): error C2059: syntax error : ';'
1>\include\c\sys\types.h(254): error C2219: syntax error : type qualifier must be after '*'
1>\include\c\sys\types.h(254): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>\include\c\sys\types.h(295): error C2371: 'wint_t' : redefinition; different basic types
1>          vc\include\crtdefs.h(447) : see declaration of 'wint_t'
1>\include\c\sys\context.h(303): error C2059: syntax error : '['
1>\include\c\sys\context.h(303): error C2238: unexpected token(s) preceding ';'
1>\include\c\setjmp.h(118): warning C4068: unknown pragma
1>\include\c\setjmp.h(119): warning C4068: unknown pragma
1>\include\c\unistd.h(190): warning C4273: 'unlink' : inconsistent dll linkage
1>          vc\include\stdio.h(299) : see previous definition of 'unlink'
1>vc\include\sys\stat.h(85): error C2146: syntax error : missing ';' before identifier 'st_dev'
1>vc\include\sys\stat.h(85): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(85): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(86): error C2146: syntax error : missing ';' before identifier 'st_ino'
1>vc\include\sys\stat.h(86): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(86): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(91): error C2146: syntax error : missing ';' before identifier 'st_rdev'
1>vc\include\sys\stat.h(91): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(91): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(92): error C2146: syntax error : missing ';' before identifier 'st_size'
1>vc\include\sys\stat.h(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(92): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(101): error C2146: syntax error : missing ';' before identifier 'st_dev'
1>vc\include\sys\stat.h(101): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(101): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(102): error C2146: syntax error : missing ';' before identifier 'st_ino'
1>vc\include\sys\stat.h(102): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(102): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(107): error C2146: syntax error : missing ';' before identifier 'st_rdev'
1>vc\include\sys\stat.h(107): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(107): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(108): error C2146: syntax error : missing ';' before identifier 'st_size'
1>vc\include\sys\stat.h(108): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(108): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(117): error C2146: syntax error : missing ';' before identifier 'st_dev'
1>vc\include\sys\stat.h(117): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(117): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(118): error C2146: syntax error : missing ';' before identifier 'st_ino'
1>vc\include\sys\stat.h(118): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(118): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(123): error C2146: syntax error : missing ';' before identifier 'st_rdev'
1>vc\include\sys\stat.h(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(131): error C2146: syntax error : missing ';' before identifier 'st_dev'
1>vc\include\sys\stat.h(131): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(131): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(132): error C2146: syntax error : missing ';' before identifier 'st_ino'
1>vc\include\sys\stat.h(132): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(132): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(137): error C2146: syntax error : missing ';' before identifier 'st_rdev'
1>vc\include\sys\stat.h(137): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(137): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(138): error C2146: syntax error : missing ';' before identifier 'st_size'
1>vc\include\sys\stat.h(138): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(138): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(145): error C2146: syntax error : missing ';' before identifier 'st_dev'
1>vc\include\sys\stat.h(145): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(145): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(146): error C2146: syntax error : missing ';' before identifier 'st_ino'
1>vc\include\sys\stat.h(146): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(146): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(151): error C2146: syntax error : missing ';' before identifier 'st_rdev'
1>vc\include\sys\stat.h(151): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\sys\stat.h(151): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>vc\include\stdlib.h(354): error C2375: '_exit' : redefinition; different linkage
1>          \include\c\unistd.h(152) : see declaration of '_exit'
1>vc\include\stdlib.h(870): error C2733: second C linkage of overloaded function 'swab' not allowed
1>          vc\include\stdlib.h(870) : see declaration of 'swab'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I tried searching around for possible fixes, but my C is very rusty and I came up with nothing. Is there anything anyone could do to point me in the right direction?

Thanks!

BH



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>