who succed to compile freetype 2.X ?

2002-11-25 Thread CHAUVIERE Jean-Raymond
I didn't succed cause of the apparently wellknown problem of _WinMain@16.
I read all the messages on different lists, the faq (but don't want to add a 
main() )
the -Wl,-u, ... has not effect.
I need the freetype as a pre requisite to compile the gd. 2.0
to get imagefontheight in php4

But if someone has a previous version of gd and other image lib as dll, i will 
be happy if he can give me the url link.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: gcc problem?

2002-11-25 Thread CHAUVIERE Jean-Raymond
I didn't program in C for a long time but as far as I remember,
scanf read 1 string using white space as separator.

to enter aaa bbb ccc
you need scanf(%s %s %s, ...) or gets

use gets
or scanf(%s, ..)
followed by
while('\n'!=getchar());
but you loose the extra typed words

hope this helps.


On Thu, 21 Nov 2002 10:46:26 +0800, Carlo Florendo [EMAIL PROTECTED]
wrote:

Hello,

Ever since I installed a newer cygwin, I've encountered problems which I
didn't encounter before.  First, there was the
ls -lproblem which has not yet been resolved (and which is threaded as ls
problem in this list.).  Just today, i discovered something wrong while
using gcc.  I  compiled the snippet below and it's supposed to prompt me for
input twice.  However, I only get prompted once.  (Using the visual c++
compiler, the borland 5.5 compiler gives the correct results)

The reverse is true for the example below: ie you were encountering
problems before, but not realising it.

My gcc version is 2.95.3-5.
Cygwin version is The cygwin1.dll version I am using is
1.3.15-cygwin-1-3-15-1.

---begin snippet-
#include stdio.h
int main()
{
   int n;
   char string[80];
   for ( n=0 ; n2 ; n++ )
   {
 printf( Enter some words:  );
 scanf( %s, string);
 printf( The first word you entered is : %s\n, string );
 fflush ( stdin );
^^^hint: while('\n'!=getchar());
   }
   return 0;
}

You can't flush(stdin). Nothing wrong with Cygwin here, simply the other
compilers implementing stuff that isn't part of the language. The FAQ
for comp.lang.c or alt.comp.lang.learn.c-c++ will no doubt give you
ample insight.





--
CHAUVIERE Jean-Raymond
06 80 38 01 14

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Is GCC buggy ?

2002-11-20 Thread CHAUVIERE Jean-Raymond
CONTENTS:
*
SYMPTOMS
SOURCE of the test program
COMPILATION + EXECUTION
STRACE
Execution de cygcheck -s -v -r

-
SYMPTOMS:

when I compile a source defining a function and calling it,
the program coredumps.

I already compiled on this machine using 2.95. 
This happens since the update gcc 3.2
I fully reinstall cygwin (today: 11/20/2002 at 14h:00( PARIS/FRANCE)
packages from programming.ccp14.uk), the same always happens.
What I compiled, rox file manager for instance, is always functionnal.

-
SOURCE of the test program

jrc@NADIAV2 ~/tmp $cat f.c
#include stdio.h

int p(char *s);

int main(int argc, char *argv[], char *envp[]) {
int r= 0 ;
printf(DEBUT\n) ;
r=p(azerty) ;
printf(FIN\n) ;
exit(0) ;
}

int p(char *s){
fprintf(stdout,dans p:%d %s\n,s,s) ;
return(2);
}
-
COMPILATION + EXECUTION

+SIMPLE
===
jrc@NADIAV2 ~/tmp $gcc f.c -o f  f
DEBUT
Segmentation fault (core dumped)


+DETAIL
===
-- note message on nonexistant include directory, after full cygwin install.


jrc@NADIAV2 ~/tmp $gcc -v f.c -o f  f
Reading specs from /bin/../lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-1/configure --enable-
languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-
zlib --enable-nls --without-included-gettext --enable-interpreter --disable-
sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --
build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-
haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --
includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)
 /bin/../lib/gcc-lib/i686-pc-cygwin/3.2/cc1.exe -lang-c -v -
iprefix /bin/../lib/gcc-lib/i686-pc-cygwin/3.2/ -D__GNUC__=3 -
D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D_X86_=1 -
D_X86_=1 -Asystem=winnt -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -
Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -
D__tune_pentium2__ -D__tune_pentium3__ -D__stdcall=__attribute__
((__stdcall__)) -D__fastcall=__attribute__((__fastcall__)) -
D__cdecl=__attribute__((__cdecl__)) -D_stdcall=__attribute__((__stdcall__)) -
D_fastcall=__attribute__((__fastcall__)) -D_cdecl=__attribute__((__cdecl__)) -
D__declspec(x)=__attribute__((x)) -D__i386__ -D__i386 -D__CYGWIN32__ -
D__CYGWIN__ -Dunix -D__unix__ -D__unix -isystem /usr/lib/gcc-lib/i686-pc-
cygwin/3.2/../../../../include/w32api -isystem /usr/lib/gcc-lib/i686-pc-
cygwin/3.2/../../../../i686-pc-cygwin/lib/../../include/w32api f.c -quiet -
dumpbase f.c -version -o /cygdrive/c/DOCUME~1/jrc/LOCALS~1/Temp/ccqSNVlP.s
GNU CPP version 3.2 20020818 (prerelease) (cpplib) (80386, BSD syntax)
GNU C version 3.2 20020818 (prerelease) (i686-pc-cygwin)
compiled by GNU C version 3.2 20020815 (prerelease).
ignoring nonexistent directory /i686-pc-cygwin/include
ignoring nonexistent directory /usr/i686-pc-cygwin/include
ignoring duplicate directory /usr/i686-pc-cygwin/lib/../../include/w32api
ignoring duplicate directory /usr/lib/gcc-lib/i686-pc-cygwin/3.2/include
#include ... search starts here:
#include ... search starts here:
 /usr/include/w32api
 /lib/gcc-lib/i686-pc-cygwin/3.2/include
 /usr/local/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/as.exe --
traditional-format -
o /cygdrive/c/DOCUME~1/jrc/LOCALS~1/Temp/ccQ9MQmJ.o /cygdrive/c/DOCUME~1/jrc/LOC
ALS~1/Temp/ccqSNVlP.s
 /bin/../lib/gcc-lib/i686-pc-cygwin/3.2/collect2.exe -Bdynamic --dll-search-
prefix=cyg -o f.exe /bin/../lib/gcc-lib/i686-pc-
cygwin/3.2/../../../crt0.o /bin/../lib/gcc-lib/i686-pc-cygwin/3.2/crtbegin.o -
L/bin/../lib/gcc-lib/i686-pc-cygwin/3.2 -L/bin/../lib/gcc-lib -L/usr/lib/gcc-
lib/i686-pc-cygwin/3.2 -L/bin/../lib/gcc-lib/i686-pc-cygwin/3.2/../../.. -
L/usr/lib/gcc-lib/i686-pc-
cygwin/3.2/../../.. /cygdrive/c/DOCUME~1/jrc/LOCALS~1/Temp/ccQ9MQmJ.o -lgcc -
lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /bin/../lib/gcc-lib/i686-
pc-cygwin/3.2/crtend.o
DEBUT
Segmentation fault (core dumped)



-
STRACE
jrc@NADIAV2 ~/tmp $strace -o strace.out f
  14322 [main] f 3300 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  17994 [main] f 3300 open_stackdumpfile: Dumping stack trace to f.exe.stackdump


STRACE.OUT

**
Program name: c:\home\jrc\cygwin\tmp\f.exe (3300)
App version:  1003.15, api: 0.63
DLL version:  1003.15, api: 0.63
DLL build:2002-11-06 22:41
OS version:   Windows NT-5.1
Heap size:402653184
Date/Time:2002-11-20 15:33:23

Re: Is GCC buggy ? : solved !

2002-11-20 Thread CHAUVIERE Jean-Raymond
replacing gcc 3.2-1 by gcc 3.2-3 (found on sunsite chlab)

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




looking for compiled lib

2002-11-19 Thread CHAUVIERE Jean-Raymond
I'm looking for the gd and freetype lib as dll.
I didn't find them via setup nor following link about ported software.

Has anybody more information about these (compiled ) lib ?
I can't compile myselh because I have a pb with gcc
(see message on this list gcc about problem with function)

Thank you
JRC

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




GCC: what is wrong with function

2002-11-18 Thread CHAUVIERE Jean-Raymond
I got problem compiling some software and see that some of them core dumps when
calling functions deefined in their code.
Here is a very simple test program.
It runs perfectly as we can expect under AIX.

#include stdio.h

int p(char *s);

int main(int argc, char *argv[]) {
int ind = 0 ;
int r = 0 ;
for ( ind = 0 ; ind  argc ; ind++ ) {
printf(%d:%s\n,ind,argv[ind]) ;
}

printf(-\n ) ;
for ( ind = 0 ; ind  argc ; ind++ ) {
char *ptr=argv[ind] ;
printf(%d %d\n,ptr, argv[ind]) ;
printf(%d %d %s\n,ind,sizeof(ptr),ptr) ;
printf(%d %d %s\n,ind,sizeof(argv[0]),ptr) ;
printf(%d %d %s\n,ind,sizeof(int),ptr) ;
r = p(argv[ind]) ;
printf(%d %d %s\n,r,ind,ptr) ;
}

return(0) ;
}

int p(char *s){
printf(dans p:%d %s\n,s,s) ;
return(2);
}
--
and the result is :

~/tmp $gcc f.c  ./a arg1 arg2 arg3
0:./a
1:arg1
2:arg2
3:arg3
-
1633486648 1633486648
0 4 ./a
0 4 ./a
0 4 ./a
4 0 ./a
1633486200 1633486200
1 4 arg1
1 4 arg1
1 4 arg1
4 1 arg1
1633486688 1633486688
2 4 arg2
2 4 arg2
2 4 arg2
4 2 arg2
1633493448 1633493448
3 4 arg3
3 4 arg3
3 4 arg3
4 3 arg3
~/tmp $ gcc -v
Reading specs from /bin/../lib/gcc-lib/i686-pc-cygwin/3.2/specs
Configured with: /netrel/src/gcc-3.2-1/configure --enable-
languages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with-system-
zlib --enable-nls --without-included-gettext --enable-interpreter --disable-
sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --
build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-
haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --
includedir=/nonexistent/include --libexecdir=/usr/sbin
Thread model: posix
gcc version 3.2 20020818 (prerelease)


Sometimes it coredumps, but this time we can see :
1) the code in p function isn't executed
2) the following printf after the call show a return value (r) incoherent.

I got gcc using setup, it seems to be a prerelease. But I don't belive gcc is 
concerned, I surely miss something?

I have no time to investigate.
Some explanation.



--
CHAUVIERE Jean-Raymond
06 80 38 01 14

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/