Hi,
I am using Winelib and no mfc to get a company app to run on Linux. It is a
cuiexe as well.
However, I get a lot of errors when I include <msvcrt/io.h>.
e.g.,
/usr/include/wine/msvcrt/stdio.h:66: syntax error before '('
This line is:
typedef struct MSVCRT(_iobuf)
Is it possible to do this with C/C++? I am assuming it is a Windows thing. My
version of wine is: wine-20010510-1.
I have attached an edited portion of compile errors and my version of
msvcrt/stdio.h.
Brian
_____________________________________________________________
Sign up for FREE email from canada-11 at http://www.canada-11.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdio.h
Type: application/octet-stream
Size: 7145 bytes
Desc: not available
Url :
http://www.winehq.org/pipermail/wine-users/attachments/20010718/f2e5ff53/stdio.obj
-------------- next part --------------
make -k
g++ -c -g -O2 -fpermissive -fno-for-scope -D_REENTRANT -DWINELIB
-I/usr/X11R6/include -I. -I/usr/include/wine
g++ -c -g -O2 -fpermissive -fno-for-scope -D_REENTRANT -DWINELIB
-I/usr/X11R6/include -I. -I/usr/include/wine
In file included from /usr/include/wine/msvcrt/io.h:11,
/usr/include/wine/msvcrt/stdio.h:66: syntax error before `{'
/usr/include/wine/msvcrt/stdio.h:75: parse error before `}'
/usr/include/wine/msvcrt/stdio.h:75: aggregate `MSVCRT FILE' has
incomplete type and cannot be initialized
/usr/include/wine/msvcrt/stdio.h:77: `fpos_t' was not declared in this
scope
/usr/include/wine/msvcrt/stdio.h:77: typedef declaration includes an
initializer
/usr/include/wine/msvcrt/stdio.h:77: typedef `MSVCRT' is initialized
/usr/include/wine/msvcrt/stdio.h:77: conflicting types for `typedef
long int MSVCRT'
/usr/include/wine/msvcrt/stdio.h:65: previous declaration as `struct
MSVCRT'
/usr/include/wine/msvcrt/stdio.h:80: conflicting types for `typedef
unsigned int (MSVCRT) (unsigned int)'
Hi, Sorry about my previous post, e.g. the one which was a mess with attached files included in text--i.e. The message which you may have thought, "What the hey?!" Anyways, my problem may be applicable and I have found the problem. In msvcrt/stdio.h includes wctype.h with the comment that it is required for NT. Since I was using Windows 2000, I commented it out. I know 2000 is based on NT but is also pretty different I think. Anyways, I made progress by copying the wctype.h file from Windows 2000. However, now I have to make changes to the file because it conflicts with /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h. Then I copied some of the defined names to wctype.h from stddef.h. E.g. so only one of the 2 definitions of wint_t is used. Has someone already done this? Are there specific defined types which should be used from one file or the other? Brian _____________________________________________________________ Sign up for FREE email from canada-11 at http://www.canada-11.com
On Wed, 18 Jul 2001, brian r wrote:> Hi, > I am using Winelib and no mfc to get a company app to run on Linux. It is a cuiexe as well. > However, I get a lot of errors when I include <msvcrt/io.h>.'#include <msvcrt/io.h>' is wrong. Here's what you should do: * '#include <io.h>' just as you would on windows * use '-isystem $(WINE_INCLUDE_ROOT)/msvcrt' in your gcc options (for those not using gcc, I believe '-I$(WINE_INCLUDE_ROOT)/msvcrt' would do too most of the time) Otherwise you'll run in the problem you ran into over and over again: you #include io.h which #includes 'xxx.h' and it gets /usr/include/.../xxx.h instead of '$(WINE_INCLUDE_ROOT)/msvcrt/xxx.h' (or does not find xxx.h at all). You should not need to copy any header from windows. If you need to do so then it's a Wine bug (well, there are probably still a couple of missing headers, let us know about it when you find one). -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Hiroshima '45 - Czernobyl '86 - Windows '95