Mailing List Archive

OT - Code stub won't compile on Gentoo
Hi,
I'm not a programmer and don't know how to fix this sort of thing.
Without going into details the following stuff is part of an SDK
package of freely licensed code that compiles (apparently) on a
Windows machine. However, on my Gentoo box I cannot find a set of
compiler parameters that will allow it to compile. I'm sure that
someone here has an idea. I need it for some stuff I'm doing in Wine.

//---Used by audioMasterOpenFileSelector-----------
struct VstFileType
{
VstFileType (char* _name, char *_macType, char *_dosType, char
*_unixType = 0, char *_mimeType1 = 0, char *_mimeType2 = 0)
{
if (_name)
strcpy (name, _name);
if (_macType)
strcpy (macType, _macType);
if (_dosType)
strcpy (dosType, _dosType);
if (_unixType)
strcpy (unixType, _unixType);
if (_mimeType1)
strcpy (mimeType1, _mimeType1);
if (_mimeType2)
strcpy (mimeType2, _mimeType2);
}
char name[128];
char macType[8];
char dosType[8];
char unixType[8];
char mimeType1[128];
char mimeType2[128];
};

If I delete out the first part, so that the structure looks like this:

//---Used by audioMasterOpenFileSelector-----------
struct VstFileType
{
char name[128];
char macType[8];
char dosType[8];
char unixType[8];
char mimeType1[128];
char mimeType2[128];
};

then it compiles fine.

Does someone know how I might tell gcc to compile the original?

If it cannot be done then that's fine too. As I say, I'm not a
programmer so this level of detail is already far beyond my skill set.

flash root # emerge info
Portage 2.0.51-r2 (default-x86-2004.0, gcc-3.3.4,
glibc-2.3.4.20041006-r0, 2.6.9-rc2-mm4-VP-S7-UMP-noACPI i686)

Thanks,
Mark

--
gentoo-user@gentoo.org mailing list
Re: OT - Code stub won't compile on Gentoo [ In reply to ]
Mark Knecht wrote:
> Does someone know how I might tell gcc to compile the original?

# g++ source.c

--
echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3

--
gentoo-user@gentoo.org mailing list
Re: OT - Code stub won't compile on Gentoo [ In reply to ]
Or name the source file "foo.cpp", and gcc should run it through the
g++ compiler.


On Tue, 26 Oct 2004 23:54:39 +0200, Christoph Gysin <cgysin@gmx.ch> wrote:
> Mark Knecht wrote:
> > Does someone know how I might tell gcc to compile the original?
>
> # g++ source.c
>
> --
> echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3
>
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>


--
Sean Crandall
Today's Sesame Street was brought to you by the number 'e'.

--
gentoo-user@gentoo.org mailing list
Re: OT - Code stub won't compile on Gentoo [ In reply to ]
Humm...OK, so I know so little about this. This code stub came from an
outside pice of software. Does this mean that those projects are C++
projects?

Can I compile a single module in C++ and then it gets used with C
programs? Or does eveything that uses this have to be C++?

This code is part of a library that gets linked to an Alsa/Jack
application called jack_fst and allows us to run VST instruments under
Wine.

Thanks,
MAark


On Tue, 26 Oct 2004 16:04:50 -0600, Sean Crandall <cranesable@gmail.com> wrote:
> Or name the source file "foo.cpp", and gcc should run it through the
> g++ compiler.
>
>
>
>
> On Tue, 26 Oct 2004 23:54:39 +0200, Christoph Gysin <cgysin@gmx.ch> wrote:
> > Mark Knecht wrote:
> > > Does someone know how I might tell gcc to compile the original?
> >
> > # g++ source.c
> >
> > --
> > echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3
> >
> >
> >
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
>
>
> --
> Sean Crandall
> Today's Sesame Street was brought to you by the number 'e'.
>
>
>
> --
> gentoo-user@gentoo.org mailing list
>
>

--
gentoo-user@gentoo.org mailing list
Re: OT - Code stub won't compile on Gentoo [ In reply to ]
On Tuesday 26 October 2004 2:28 pm, Mark Knecht wrote:

<snip/>

> Does someone know how I might tell gcc to compile the original?

Nope... The code you are looking at is not C. It's C++. While I believe
that it's possible to tell gcc to compile C++, you'll find it a lot easier to
just use g++.

Josh
Re: OT - Code stub won't compile on Gentoo [ In reply to ]
On Tue, 26 Oct 2004 17:15:00 -0700, Josh Helmer <joshhelmer@cox.net> wrote:
> On Tuesday 26 October 2004 2:28 pm, Mark Knecht wrote:
>
> <snip/>
>
> > Does someone know how I might tell gcc to compile the original?
>
> Nope... The code you are looking at is not C. It's C++. While I believe
> that it's possible to tell gcc to compile C++, you'll find it a lot easier to
> just use g++.
>
> Josh
>
>
>
So I'd approach this by changing the Makefile for the program?

I'm confused about how far this proceeds though. This is part of a
library called fst. fst is used by a program called jack_fst. Let's
say I change fst's Makefile to use g++. Can I then link it to jack_fst
and still build jack_fst with gcc, or do I have to change the jack_fst
build process also?

Thanks for the info!

Cheers,
Mark

--
gentoo-user@gentoo.org mailing list
Re: OT - Code stub won't compile on Gentoo [ In reply to ]
On Tue, 26 Oct 2004 18:05:03 -0700, Mark Knecht <markknecht@gmail.com> wrote:
>
> I'm confused about how far this proceeds though. This is part of a
> library called fst. fst is used by a program called jack_fst. Let's
> say I change fst's Makefile to use g++. Can I then link it to jack_fst
> and still build jack_fst with gcc, or do I have to change the jack_fst
> build process also?
>
> Thanks for the info!

The argument -x allows you to tell gcc what language the file is in.
"-x c++" ought to fix the problem.

--
Ed

--
gentoo-user@gentoo.org mailing list