www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/10/21:56:03

From: hyung kim <kimhs20 AT chollian DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Eli Zaretskii,How can I use flex and bison in MSVC?
Date: Fri, 11 Dec 1998 11:40:50 +0900
Organization: Korea Telecom
Lines: 108
Message-ID: <36708632.323A9112@chollian.net>
NNTP-Posting-Host: 210.105.194.218
Mime-Version: 1.0
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

dear Eli Zaretskii,

your e-mail address(eliz AT is DOT elta DOT co DOT il) was not working.

so I post message );-)

-------------------------------------------------------------------------

thanks for your interest.

Eli Zaretskii wrote:

> On Thu, 10 Dec 1998, hyung kim wrote:
>
> > I have already got  flex2.47 and bison1.24 executables(flex247.exe,
> > bison124.exe, etc..) and library(flexlib.lib) from ftp.winsite.com.
>
> I would guess that these were not compiled with DJGPP, and therefore
are
> not fully compatible with DJGPP.  In particular, you cannot use
> flexlib.lib with DJGPP programs.

I did not use flexlib.lib with DJGPP programs, In MSVC5.0 I linked
flexlib.lib with parser.c and lexer.c generated by flex 2.54 and bison
1.25.
I have been used MSVC5.0 on Windows NT.

To get lexer and parser source for my grammer I used flex and bison
executables downloaded from gnu djgpp site.
When I build a parser in MSVC 5.0, I can get following errors
--------------------Configuration: test - Win32
Debug--------------------
Linking...
lexyy.obj : error LNK2001: unresolved external symbol _yywrap
test_tab.obj : error LNK2001: unresolved external symbol _yyerror
WinDebug/test.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

test.exe - 3 error(s), 0 warning(s)
-----------------------------------------------------------------------------

But If I link flexlib.lib for flex2.47 with parser generated by flex2.54

and
bison1.25,
generated parser program are compiled correctly and works fine  with
only one
warning as follows.

--------------------Configuration: test - Win32
Debug--------------------
Linking...
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other
libs;
use /NODEFAULTLIB:library

test.exe - 0 error(s), 1 warning(s)
--------------------------------------------------------------------------------

Could I ignore this warning?


>
> > I hope to use flex2.54 and bison1.25 . but I can find flexlib.lib
> > niether flexlib source
>
> The library is called libfl.a in the DJGPP distribution, that's how it

is
> called on Unix systems.

You mean that I can also use libfl.a in MSVC5.0?
Even if I linked libfl.a in MSVC5.0, above errors are also same..

>
> > Could I use flexlib.lib for flex2.47 with flex.exe(v2.54) and
> > bison.exe(1.25) instead of flexlib.lib for flex2.54?
>
> No, I'm almost sure they are incompatible.
>
> > Where can I get flexlib.lib for flex2.54?
>
> I don't know.  But why would you want to?  Do you need that to compile

> with some other compiler, not GCC?

Now, I hope to compile and link  parser generated by flex 2.54 and bison

1.25
in MSVC 5.0,
and afterwards I will use watcom 11.0a compiler with STL and parser
generated
by flexbison.
Surely I think that I need flex library for MSVC and Watcom 11.0a.


I hope to get your helps,

regards,

ps. If you are interested in 3D graphics programming , visit my page
(http://user.chollian.net/~kimhs20 );-)
    My page have some information regarding to OpenGL/OpenInventor and
3D
graphics.



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019