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

Compilation fails: string.h:51:20: error: expected ‘)’ before ‘VString #3

Closed
fbemm opened this issue Mar 7, 2017 · 8 comments

Comments

@fbemm
Copy link

fbemm commented Mar 7, 2017

I am trying to compile wtdbg and get the following error:

file_reader.c:247:8: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
In file included from list.h:24:0,
from dmo.h:20,
from wtdbg.c:20:
./string.h:51:20: error: expected ‘)’ before ‘VString’
define_list(VStrv, VString);
^
In file included from list.h:24:0,
from dmo.h:20,
from wtdbg.c:20:
./string.h:245:71: error: unknown type name ‘VStrv’
static inline string_size_t split_string(String *str, char separator, VStrv *vstrs){
^
./string.h:270:73: error: unknown type name ‘VStrv’
static inline string_size_t split_vstring(VString *str, char separator, VStrv *vstrs, string_size_t cut){
^
In file included from dmo.h:20:0,
from wtdbg.c:20:

Additionally, there are thousand warning like this:

list.h:341:2: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’
memcpy(list1->buffer + list1->size, ary, sizeof(e_type) * size); \

Probably one should add #include <string.h> to all c files.

@ruanjue
Copy link
Owner

ruanjue commented Mar 7, 2017

Which version of linux-gcc was used in you compilation? Or not linux-gcc. I tested the codes in linux-gcc 4.4.7. Thanks for evaluation!

@fbemm
Copy link
Author

fbemm commented Mar 7, 2017

I tried it with:

gcc (GCC) 4.8.4

and

gcc (GCC) 5.4.0

@ruanjue
Copy link
Owner

ruanjue commented Mar 7, 2017

I see, will update codes. Please wait for days.

@ruanjue
Copy link
Owner

ruanjue commented Mar 15, 2017

Hi, please check out again. If there are still problems, please let me know. Thanks!

@ruanjue ruanjue closed this as completed Mar 18, 2017
@fbemm
Copy link
Author

fbemm commented Mar 29, 2017

Error still happens. I guess the code should be in a style that compiles on a current Ubuntu system with gcc (GCC) 4.8.4 or higher.

@fbemm
Copy link
Author

fbemm commented Mar 29, 2017

./string.h:51:20: error: expected ‘)’ before ‘VString’
./string.h:245:71: error: unknown type name ‘VStrv’
./string.h:270:73: error: unknown type name ‘VStrv’
file_reader.h:63:2: error: unknown type name ‘VStrv’
file_reader.h:97:56: error: invalid type argument of ‘->’ (have ‘int’)
file_reader.h:97:56: error: invalid type argument of ‘->’ (have ‘int’)
file_reader.h:97:56: error: invalid type argument of ‘->’ (have ‘int’)

@ruanjue ruanjue reopened this Mar 29, 2017
@ruanjue
Copy link
Owner

ruanjue commented Mar 29, 2017

I have successfully compiled the latest code under Linux version 2.6.32-504.e16.x86_64, using GCC versions of gcc-4.4.7, gcc-4.9.4, gcc-5.4.0 and gcc-6.3.0. BTW, my OS is redhat-release CentOS release 6.6.

@ruanjue ruanjue closed this as completed Apr 13, 2017
@ruanjue ruanjue reopened this Mar 6, 2018
@ruanjue
Copy link
Owner

ruanjue commented Mar 6, 2018

If you are still having the problem, please see #4 .

@ruanjue ruanjue closed this as completed Mar 6, 2018
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

2 participants