public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc compiler
@ 2001-02-22 17:07 Salari, Morris M
  2001-02-22 17:48 ` Jerry Miller
  2001-02-23  1:08 ` Jerry Miller
  0 siblings, 2 replies; 14+ messages in thread
From: Salari, Morris M @ 2001-02-22 17:07 UTC (permalink / raw)
  To: 'help-gcc@gnu.org'

[-- Attachment #1: Type: text/plain, Size: 239 bytes --]

I am trying to compile a C program "http_get.c" with gcc compiler
on Unix Solaris 2.6, it does not compile and gcc is giving me attaced
error file. Please help if you could.
gcc-2.8.1.
Solaris 2.6.
Morris Salari
415-927-6766 <<gccerror>> 

[-- Attachment #2: gccerror --]
[-- Type: text/plain, Size: 501 bytes --]


Undefined                       first referenced
 symbol                             in file
socket                              /var/tmp/ccE8xpR_1.o
getprotobyname                      /var/tmp/ccE8xpR_1.o
gethostbyname                       /var/tmp/ccE8xpR_1.o
bind                                /var/tmp/ccE8xpR_1.o
getservbyname                       /var/tmp/ccE8xpR_1.o
connect                             /var/tmp/ccE8xpR_1.o
ld: fatal: Symbol referencing errors. No output written to prog


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: gcc compiler
  2001-02-22 17:07 gcc compiler Salari, Morris M
@ 2001-02-22 17:48 ` Jerry Miller
  2001-02-23  1:08 ` Jerry Miller
  1 sibling, 0 replies; 14+ messages in thread
From: Jerry Miller @ 2001-02-22 17:48 UTC (permalink / raw)
  To: help-gcc

I assume this is from the book "WinSock 2.0".
If so, you will have to make the following changes
to the includes::

#ifdef WINDOWS
#include <windows.h>
#define SD_BOTH 2
#else
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

#define SOCKET            int
#define SOCKET_ERROR      -1
#define SD_RECEIVE        0
#define SD_SEND           1
#define SD_BOTH           2
#define FAR
#define WSAGetLastError() h_errno
#define WSANO_DATA        NO_DATA
#define SOCKET            int
#define INVALID_SOCKET    -1
#define closesocket(s)    close((s))
#define strnicmp(a,b,c)   strncasecmp((a),(b),(c))
#ifdef SOLARIS
#define INADDR_NONE       (in_addr_t) -1
#endif
#endif

You will also have to modify the code as follows:

#ifdef WINDOWS
  server_sockaddr.sin_addr = *((LPIN_ADDR) *host_entry->h_addr_list);
#else
#ifdef SOLARIS
  server_sockaddr.sin_addr.s_addr = *(unsigned long *) (host_entry->h_addr);
  for (i=0; i<8; i++) server_sockaddr.sin_zero[i] = 0;
#else
   server_sockaddr.sin_addr.s_addr = host_entry?*(unsigned long
*)(host_entry->h_addr):host.s_addr;
#endif
#endif

(I'm not sure this is exact, since I've modified the code for my own
purposes.
This is excerpted from a book I've written, "Designing Spiders and Robots in
C/C++ (and Perl) for UNIX/Solaris/Linux/Posix and Windows 95/98/NT".)

----- Original Message -----
From: Salari, Morris M <MMSc@pge.com>
To: <help-gcc@gnu.org>
Sent: Thursday, February 22, 2001 8:04 PM
Subject: gcc compiler


> I am trying to compile a C program "http_get.c" with gcc compiler
> on Unix Solaris 2.6, it does not compile and gcc is giving me attaced
> error file. Please help if you could.
> gcc-2.8.1.
> Solaris 2.6.
> Morris Salari
> 415-927-6766 <<gccerror>>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: gcc compiler
  2001-02-22 17:07 gcc compiler Salari, Morris M
  2001-02-22 17:48 ` Jerry Miller
@ 2001-02-23  1:08 ` Jerry Miller
  2001-02-23  8:28   ` remote XOpenDisplay in Solaris (SunOS 5.6) Jerry Miller
  1 sibling, 1 reply; 14+ messages in thread
From: Jerry Miller @ 2001-02-23  1:08 UTC (permalink / raw)
  To: Salari, Morris M, help-gcc

Oops!  I just looked again and realized that these are
not compilation errors, but rather unsatisfied externals
in the link step.  Include "-lsocket" in your gcc command
line.  Solaris requires this explicitly, while many other
flavors of UNIX automatically supply it.

Sorry for the hasty first response.  This should work.

----- Original Message ----- 
From: Salari, Morris M <MMSc@pge.com>
To: <help-gcc@gnu.org>
Sent: Thursday, February 22, 2001 8:04 PM
Subject: gcc compiler


> I am trying to compile a C program "http_get.c" with gcc compiler
> on Unix Solaris 2.6, it does not compile and gcc is giving me attaced
> error file. Please help if you could.
> gcc-2.8.1.
> Solaris 2.6.
> Morris Salari
> 415-927-6766 <<gccerror>> 
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* remote XOpenDisplay in Solaris (SunOS 5.6)
  2001-02-23  1:08 ` Jerry Miller
@ 2001-02-23  8:28   ` Jerry Miller
  0 siblings, 0 replies; 14+ messages in thread
From: Jerry Miller @ 2001-02-23  8:28 UTC (permalink / raw)
  To: help-gcc

Does anyone have an idea why Motif applications that
used to run either locally or with a remote display now
only work locally, causing a Segmentation fault as soon
as XtVaAppInitialize () (or its more primitive component,
XOpenDisplay()) is called in a remote-display run?

I am able to run the PC (Interix) version of the same
software with either a local (HWM) or remote (olwm)
display, but the Solaris versions bomb on a remote
display attempt.  Older, less complex versions of
the software do not have this problem.  When I
#define out calls from main() to other local functions,
I still have it bombing, unless I also comment out a
number of calls to external functions from the local
functions that are never called!

It almost seems as if there is a memory-management
problem, despite having 1/2Gb RAM on the Suns,
such that creating too large an executable (over 3Mb)
causes a conflict with communications overhead?!?!
The executables that don't bomb are around 2Mb.

Using gdb to try to find the answer is no help.
It does tell me that the crash (apparently) occurs
in one of many calls to strlen() from within
XtVaAppInitialize(), but with all this opaque code
(not to mention that X and Motif are flaky in lots
of other ways), that information is totally
meaningless, even in the unlikely event the
debugger isn't introducing its own uncertainty
(a la Heisenberg?)

It's hard to know exactly when this started,
because we hadn't been trying remote displays
on a daily or weekly basis.  I might try
switching from the common desktop environment
back to the openwin environment the next time
I logout, which I very seldom do.

Rather than waste any more time on trial and
error, I thought I'd see whether there's a
window manager guru out there who might
have answers or suggestions.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: gcc compiler
  2008-05-24 14:55 ` Tim Prince
@ 2008-05-24 16:00   ` Blake Huff
  0 siblings, 0 replies; 14+ messages in thread
From: Blake Huff @ 2008-05-24 16:00 UTC (permalink / raw)
  To: gcc-help

Miguel:

>> PS: I am a new user in Mac. I know unix and windows, but i am a bit losed with Mac Os

If you're on a Mac, simply install XCode from the OS X installation
DVD, or download XCode from the webpage. It installs the GUI IDE, but
you can invoke gcc from the command line, as you're familiar from
MinGW/unix. If you run in to trouble, visit Apple's homepage or google
and you should find all the starter answers you need.


Blake

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: gcc compiler
  2008-05-24 12:44 gcc compiler Miguel de la Ossa
@ 2008-05-24 14:55 ` Tim Prince
  2008-05-24 16:00   ` Blake Huff
  0 siblings, 1 reply; 14+ messages in thread
From: Tim Prince @ 2008-05-24 14:55 UTC (permalink / raw)
  To: Miguel de la Ossa; +Cc: gcc-help

Miguel de la Ossa wrote:
> Hello,
> 
> I've downloaded MinGW 3.4.5 but I don't know how to invoke the compiler. 
> I tried:
> 
> gcc
> cc
> c++
> c

> PS: I am a new user in Mac. I know unix and windows, but i am a bit 
> losed with Mac Os

mingw isn't for MacOS, it's for Windows.  If you installed mingw gcc on 
Windows, it should show up in mingw /bin directory, probably with some 
mingw prefix to the name, depending on which one you have.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* gcc compiler
@ 2008-05-24 12:44 Miguel de la Ossa
  2008-05-24 14:55 ` Tim Prince
  0 siblings, 1 reply; 14+ messages in thread
From: Miguel de la Ossa @ 2008-05-24 12:44 UTC (permalink / raw)
  To: gcc-help

Hello,

I've downloaded MinGW 3.4.5 but I don't know how to invoke the  
compiler. I tried:

gcc
cc
c++
c

and so on.

Could you help me?

Thanks in advance,

Miguel de la Ossa

PS: I am a new user in Mac. I know unix and windows, but i am a bit  
losed with Mac Os

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: GCC Compiler
@ 2002-07-01 22:52 Ravi Kumar Bhattiprolu
  0 siblings, 0 replies; 14+ messages in thread
From: Ravi Kumar Bhattiprolu @ 2002-07-01 22:52 UTC (permalink / raw)
  To: 'Pooyan Sepahvand', gcc-help

Hi Pooyan,

  You can try www.sunfreeware.com. here you will get precompiled binaries
for gcc etc. But you need to have root access on machine since you need to
use pkgadd to install these software.

regards,
Ravi

-----Original Message-----
From: Pooyan Sepahvand [mailto:psepah@yahoo.com]
Sent: Tuesday, July 02, 2002 11:19 AM
To: gcc-help@gcc.gnu.org
Subject: GCC Compiler


Hi,
We have the following machine,  and trying  to install
gcc compiler from metalab, unfortunately we are not
able. Could you please help us to download and install
appropriate version, which is suitable for our machine
(solaris 8)? In advance we would appreciate your help.

All the best
Pooyan



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* GCC Compiler
@ 2002-07-01 22:49 Pooyan Sepahvand
  0 siblings, 0 replies; 14+ messages in thread
From: Pooyan Sepahvand @ 2002-07-01 22:49 UTC (permalink / raw)
  To: gcc-help

Hi,
We have the following machine,  and trying  to install
gcc compiler from metalab, unfortunately we are not
able. Could you please help us to download and install
appropriate version, which is suitable for our machine
(solaris 8)? In advance we would appreciate your help.

All the best
Pooyan



__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* GCC Compiler
@ 2001-05-31 11:39 Ed Hudak
  0 siblings, 0 replies; 14+ messages in thread
From: Ed Hudak @ 2001-05-31 11:39 UTC (permalink / raw)
  To: 'help-gcc@gnu.org'

I'm trying to install just the gcc compiler on my HPUX11.0 .
Can you email back what to copy rather than use the cdlin.;1 script. 
The drivers don't support   Rock Ridge so I get the ;1 everywhere.

Thanks in Advance
Ed Hudak
LBM Systems LLC.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* GCC compiler
  1999-12-29 20:25 GCC compiler Hung Vu
  1999-12-29 20:27 ` Jeffrey A Law
@ 1999-12-31 22:24 ` Hung Vu
  1 sibling, 0 replies; 14+ messages in thread
From: Hung Vu @ 1999-12-31 22:24 UTC (permalink / raw)
  To: help-gcc

Dear Sir,

I used a  sample (C source code from Oracle corp.) which used the compiler 
from SUN. Now I compile this sample with the new compiler (gcc v2.95.1)and I 
had the following error  messages:
        gcc: unrecognized option `-Xa'
        gcc: unrecognized option `-K'
        gcc: language chip=ultra not recognized
I copy all my screen for you:
( make -f demo_rdbms.mk  build EXE=demo OBJS=demo.o
gcc  -xO2  -Xa  -xstrconst -xF  -mr  -xarch=v8 -xcache=16/32/1:1024/64/1 
-xchip=
ultra -D_REENTRANT -K PIC  -I/8i/app/Oracle05/product/8.0.5/rdbms/demo 
-I/8i/app
/Oracle05/product/8.0.5/rdbms/public 
-I/8i/app/Oracle05/product/8.0.5/plsql/publ
ic -I/8i/app/Oracle05/product/8.0.5/network/public -DSLMXMX_ENABLE 
-DSLTS_ENABLE
-D_SVID_GETTOD     -c  demo.c
gcc: PIC: No such file or directory
gcc: unrecognized option `-Xa'
gcc: unrecognized option `-K'
gcc: language chip=ultra not recognized
*** Error code 1
make: Fatal error: Command failed for target `demo.o')

What options I need to choose in my new compiler in order for resolving 
these error message ?
  I wait for your feedback.

Thanks,
HungVu

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: GCC compiler
  1999-12-29 20:27 ` Jeffrey A Law
@ 1999-12-31 22:24   ` Jeffrey A Law
  0 siblings, 0 replies; 14+ messages in thread
From: Jeffrey A Law @ 1999-12-31 22:24 UTC (permalink / raw)
  To: Hung Vu; +Cc: help-gcc

  In message < 19991230042456.30587.qmail@hotmail.com >you write:
  > Dear Sir,
  > 
  > I used a  sample (C source code from Oracle corp.) which used the compiler 
  > from SUN. Now I compile this sample with the new compiler (gcc v2.95.1)and 
  > I 
  > had the following error  messages:
  >         gcc: unrecognized option `-Xa'
  >         gcc: unrecognized option `-K'
  >         gcc: language chip=ultra not recognized
  > I copy all my screen for you:
  > ( make -f demo_rdbms.mk  build EXE=demo OBJS=demo.o
  > gcc  -xO2  -Xa  -xstrconst -xF  -mr  -xarch=v8 -xcache=16/32/1:1024/64/1 
  > -xchip=
  > ultra -D_REENTRANT -K PIC  -I/8i/app/Oracle05/product/8.0.5/rdbms/demo 
  > -I/8i/app
  > /Oracle05/product/8.0.5/rdbms/public 
  > -I/8i/app/Oracle05/product/8.0.5/plsql/publ
  > ic -I/8i/app/Oracle05/product/8.0.5/network/public -DSLMXMX_ENABLE 
  > -DSLTS_ENABLE
  > -D_SVID_GETTOD     -c  demo.c
  > gcc: PIC: No such file or directory
  > gcc: unrecognized option `-Xa'
  > gcc: unrecognized option `-K'
  > gcc: language chip=ultra not recogn
You should read the GCC manual.  You will find these options are not for
the GCC compiler, but instead are for some other compiler.

Obviously if you pass GCC options that were for some other compiler compiler
then GCC is going to issue error messages.
jeff

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: GCC compiler
  1999-12-29 20:25 GCC compiler Hung Vu
@ 1999-12-29 20:27 ` Jeffrey A Law
  1999-12-31 22:24   ` Jeffrey A Law
  1999-12-31 22:24 ` Hung Vu
  1 sibling, 1 reply; 14+ messages in thread
From: Jeffrey A Law @ 1999-12-29 20:27 UTC (permalink / raw)
  To: Hung Vu; +Cc: help-gcc

  In message < 19991230042456.30587.qmail@hotmail.com >you write:
  > Dear Sir,
  > 
  > I used a  sample (C source code from Oracle corp.) which used the compiler 
  > from SUN. Now I compile this sample with the new compiler (gcc v2.95.1)and 
  > I 
  > had the following error  messages:
  >         gcc: unrecognized option `-Xa'
  >         gcc: unrecognized option `-K'
  >         gcc: language chip=ultra not recognized
  > I copy all my screen for you:
  > ( make -f demo_rdbms.mk  build EXE=demo OBJS=demo.o
  > gcc  -xO2  -Xa  -xstrconst -xF  -mr  -xarch=v8 -xcache=16/32/1:1024/64/1 
  > -xchip=
  > ultra -D_REENTRANT -K PIC  -I/8i/app/Oracle05/product/8.0.5/rdbms/demo 
  > -I/8i/app
  > /Oracle05/product/8.0.5/rdbms/public 
  > -I/8i/app/Oracle05/product/8.0.5/plsql/publ
  > ic -I/8i/app/Oracle05/product/8.0.5/network/public -DSLMXMX_ENABLE 
  > -DSLTS_ENABLE
  > -D_SVID_GETTOD     -c  demo.c
  > gcc: PIC: No such file or directory
  > gcc: unrecognized option `-Xa'
  > gcc: unrecognized option `-K'
  > gcc: language chip=ultra not recogn
You should read the GCC manual.  You will find these options are not for
the GCC compiler, but instead are for some other compiler.

Obviously if you pass GCC options that were for some other compiler compiler
then GCC is going to issue error messages.
jeff

^ permalink raw reply	[flat|nested] 14+ messages in thread

* GCC compiler
@ 1999-12-29 20:25 Hung Vu
  1999-12-29 20:27 ` Jeffrey A Law
  1999-12-31 22:24 ` Hung Vu
  0 siblings, 2 replies; 14+ messages in thread
From: Hung Vu @ 1999-12-29 20:25 UTC (permalink / raw)
  To: help-gcc

Dear Sir,

I used a  sample (C source code from Oracle corp.) which used the compiler 
from SUN. Now I compile this sample with the new compiler (gcc v2.95.1)and I 
had the following error  messages:
        gcc: unrecognized option `-Xa'
        gcc: unrecognized option `-K'
        gcc: language chip=ultra not recognized
I copy all my screen for you:
( make -f demo_rdbms.mk  build EXE=demo OBJS=demo.o
gcc  -xO2  -Xa  -xstrconst -xF  -mr  -xarch=v8 -xcache=16/32/1:1024/64/1 
-xchip=
ultra -D_REENTRANT -K PIC  -I/8i/app/Oracle05/product/8.0.5/rdbms/demo 
-I/8i/app
/Oracle05/product/8.0.5/rdbms/public 
-I/8i/app/Oracle05/product/8.0.5/plsql/publ
ic -I/8i/app/Oracle05/product/8.0.5/network/public -DSLMXMX_ENABLE 
-DSLTS_ENABLE
-D_SVID_GETTOD     -c  demo.c
gcc: PIC: No such file or directory
gcc: unrecognized option `-Xa'
gcc: unrecognized option `-K'
gcc: language chip=ultra not recognized
*** Error code 1
make: Fatal error: Command failed for target `demo.o')

What options I need to choose in my new compiler in order for resolving 
these error message ?
  I wait for your feedback.

Thanks,
HungVu

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2008-05-24 14:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-22 17:07 gcc compiler Salari, Morris M
2001-02-22 17:48 ` Jerry Miller
2001-02-23  1:08 ` Jerry Miller
2001-02-23  8:28   ` remote XOpenDisplay in Solaris (SunOS 5.6) Jerry Miller
  -- strict thread matches above, loose matches on Subject: below --
2008-05-24 12:44 gcc compiler Miguel de la Ossa
2008-05-24 14:55 ` Tim Prince
2008-05-24 16:00   ` Blake Huff
2002-07-01 22:52 GCC Compiler Ravi Kumar Bhattiprolu
2002-07-01 22:49 Pooyan Sepahvand
2001-05-31 11:39 Ed Hudak
1999-12-29 20:25 GCC compiler Hung Vu
1999-12-29 20:27 ` Jeffrey A Law
1999-12-31 22:24   ` Jeffrey A Law
1999-12-31 22:24 ` Hung Vu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).