J
jc
I have written a parser using bison and flex to read ASAP2 file for CAN
communications. entire development was done in an unix environment and
now the code is ready to be integrated to an existing CAN communication
software that i wrote earlier in windows environment(as we get drivers
for these CAN cards only for the windows).
my problem started when i started to move the code from linux to the
visual studio. after many compilation and link error now the code
compiles successfully. i have to mention that whatever changes i make
in the code first i make it in the linux, compile it, run it to check
whether the code works. then i commit those changes in the visual
studio environment.
now my code successfully compiles and links in both linux and windows
environment(except the include unistd.h problem).
when i run the code it, the program crashes with the error "Unhandled
exception, error reading 0xc00005. access violation".
when i debug the code it the value retured from the lex, which
yylval.ptr (which is char *) supposed to have a value is null. and when
i tried to process that pointer i get the above error.
my thoughts about this problem is in the lex file i declare
YYSTYPE yylval;
and it is extern in the bison grammar.
in the linux environment even if i don't declare yylval, i never heard
any complaints. but visual studio complaints about yylval till i
declare it as follows.
please help me
jc
communications. entire development was done in an unix environment and
now the code is ready to be integrated to an existing CAN communication
software that i wrote earlier in windows environment(as we get drivers
for these CAN cards only for the windows).
my problem started when i started to move the code from linux to the
visual studio. after many compilation and link error now the code
compiles successfully. i have to mention that whatever changes i make
in the code first i make it in the linux, compile it, run it to check
whether the code works. then i commit those changes in the visual
studio environment.
now my code successfully compiles and links in both linux and windows
environment(except the include unistd.h problem).
when i run the code it, the program crashes with the error "Unhandled
exception, error reading 0xc00005. access violation".
when i debug the code it the value retured from the lex, which
yylval.ptr (which is char *) supposed to have a value is null. and when
i tried to process that pointer i get the above error.
my thoughts about this problem is in the lex file i declare
YYSTYPE yylval;
and it is extern in the bison grammar.
in the linux environment even if i don't declare yylval, i never heard
any complaints. but visual studio complaints about yylval till i
declare it as follows.
please help me
jc