[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[fxscintilla-users] More Cygwin Information
From: |
David Hisel |
Subject: |
[fxscintilla-users] More Cygwin Information |
Date: |
Tue, 12 Nov 2002 14:30:37 -0500 |
1- Create the file conftest.c:
----------------------------
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */char
fxfindfox ();
int main ()
{
fxfindfox ();
;
return 0;
}
----------------------------
ok.
2- Compile it using the command line:
gcc -o conftest.exe -g -O2 -I/usr/include -L/usr/lib -lFOX conftest.c
After reading the FAQ for cygwin, I found that the library switches must
appear at the end of the command line. Cygwin also needed the "-mwindows"
switch turned on. So, I moved the "-lFOX" switch to the end and added
"-mwindows" and here's the results after running it:
=====OUTPUT=====
$ gcc -o x.exe -O2 -g -I/usr/include -L/usr/lib -mwindows x.c -lFOX
cc1: warning: changing search order for system directory "/usr/include"
cc1: warning: as it has already been specified as a non-system directory
/usr/lib/libFOX.a(fxutils.o.b)(.eh_frame+0x11):fxutils.cpp: undefined
reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status
================
Even though gcc did not work, g++ seems to work, keep reading...
That _should_ work.
3- Rename contest.c to conftest.cc
4- Compile it using the command line:
g++ -o conftest.exe -g -O2 -I/usr/include -L/usr/lib -lFOX conftest.cc
After moving the "-lFOX" switch to the end and adding "-mwindows" it seems
to compile with g++
=====OUTPUT=====
$ g++ -o x.exe -O2 -g -I/usr/include -L/usr/lib -mwindows x.cpp -lFOX
cc1plus: warning: changing search order for system directory "/usr/include"
cc1plus: warning: as it has already been specified as a non-system
directory
$ if [ `./x.exe` ]; then echo "YES"; else echo "NO"; fi
NO
$ # it returns zero which is the expected behaviour
================
And tell me what happens.
BTW, which gcc version are you using?
$ g++ --version
g++ (GCC) 3.2 20020818 (prerelease)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I used cygwin's setup.exe and this is the default version that is being
installed, gcc 2.95 is still available though.
A side note, cygwin's latest autoconf is only versin 2.53b and your
aclocal.m4 requires 2.54. This seems to be merely an inconvenience as
I was able to change the version to 2.53b and run autoconf just fine.
Cheers,
.dave.
- [fxscintilla-users] More Cygwin Information,
David Hisel <=