public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: Bug trying to compile a C++ program with libjpeg
[not found] <376FE8A4.BF3534AC@cs.uregina.ca>
@ 1999-07-01 12:19 ` Martin v. Loewis
1999-07-02 7:35 ` Kendrick Hamilton
0 siblings, 1 reply; 2+ messages in thread
From: Martin v. Loewis @ 1999-07-01 12:19 UTC (permalink / raw)
To: hamiltok; +Cc: egcs-bugs
> g++ -v --save-temps -ljpeg *.cpp
Thanks for your bug report. Unfortunately, you did not report the
error you are getting. Looking at your command line, I see that you
did not mention what the output file should be. Typically, g++ is
invoked with a -o option when linking; please see the gcc manual for
details.
Regards,
Martin
>From law@cygnus.com Thu Jul 01 12:41:00 1999
From: Jeffrey A Law <law@cygnus.com>
To: Alexandre Oliva <oliva@dcc.unicamp.br>
Cc: Stephane Conversy <Stephane.Conversy@lri.fr>, egcs-bugs@egcs.cygnus.com, egcs-patches@egcs.cygnus.com
Subject: Re: compile and install bugs on irix
Date: Thu, 01 Jul 1999 12:41:00 -0000
Message-id: <30399.930857885@upchuck.cygnus.com>
References: <oryah0nr6y.fsf@saci.lsd.dcc.unicamp.br>
X-SW-Source: 1999-07/msg00025.html
Content-length: 578
In message < oryah0nr6y.fsf@saci.lsd.dcc.unicamp.br >you write:
> On Jul 1, 1999, Jeffrey A Law <law@cygnus.com> wrote:
>
> > OK. Go ahead and check it in then.
>
> Done. BTW, shouldn't it be checked in the trunk too? I ask because
> last week's changes haven't been checked in there. Even though we're
> going to wipe texinfo out of our tree, I'd better keep then in sync
> before we do. Would you mind if I updated the trunk with the latest
> branch changes?
I'd prefer not to check in any texinfo related changes to the mainline
sources.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug trying to compile a C++ program with libjpeg
1999-07-01 12:19 ` Bug trying to compile a C++ program with libjpeg Martin v. Loewis
@ 1999-07-02 7:35 ` Kendrick Hamilton
0 siblings, 0 replies; 2+ messages in thread
From: Kendrick Hamilton @ 1999-07-02 7:35 UTC (permalink / raw)
To: Martin v. Loewis; +Cc: hamiltok, egcs-bugs
The makers of Libjpeg already sent me the solution. The header files for
libjpeg do not have the required extern "C" to allow for the use of C++
directly. If you are writing a C++ program that uses libjpeg, you need to
use the following code to include the header files in the program:
#ifdef __cplusplus //include the jpeg library as a C file.
extern "C"{
#endif
#include<jpeglib.h>
#ifdef __cplusplus
}
#endif
This requirement is not well documented ad was the source of the problems.
Also note, I was allowing the compiler to use the default output file,
a.out. That is why it did not have a -o option when linking.
Regards,
Kendrick Hamilton
On Thu, 1 Jul 1999, Martin v. Loewis wrote:
> > g++ -v --save-temps -ljpeg *.cpp
>
> Thanks for your bug report. Unfortunately, you did not report the
> error you are getting. Looking at your command line, I see that you
> did not mention what the output file should be. Typically, g++ is
> invoked with a -o option when linking; please see the gcc manual for
> details.
>
> Regards,
> Martin
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-07-02 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <376FE8A4.BF3534AC@cs.uregina.ca>
1999-07-01 12:19 ` Bug trying to compile a C++ program with libjpeg Martin v. Loewis
1999-07-02 7:35 ` Kendrick Hamilton
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).