help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with 'mkoctfile'


From: Henry F. Mollet
Subject: Re: problem with 'mkoctfile'
Date: Sun, 07 May 2006 08:19:09 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

I had no problem with mkoctfile recently (NegBinSNP.cc from Michael Creel)
but I could not compile hello.cc either. Does Jeff Miller's reply apply?
Also, why do I have four 'hello.cc' files?
Henry

Last login: Sun May  7 07:57:19 on console
Welcome to Darwin!
[~] -bash-2.05b 501$ locate hello.cc
/usr/local/share/doc/gettext/examples/hello-c++/hello.cc
/usr/local/share/doc/gettext/examples/hello-c++-gnome/hello.cc
/usr/local/share/doc/gettext/examples/hello-c++-kde/hello.cc
/usr/local/share/doc/gettext/examples/hello-c++-qt/hello.cc

[~] -bash-2.05b 502$ mkoctfile hello.cc
powerpc-apple-darwin8-g++-4.0.0: hello.cc: No such file or directory
powerpc-apple-darwin8-g++-4.0.0: no input files
[~] -bash-2.05b 503$ cd /usr/local/share/doc/gettext/examples/hello-c++

[/usr/local/share/doc/gettext/examples/hello-c++] -bash-2.05b 504$ mkoctfile
hello.cc
hello.cc:25:21: error: gettext.h: No such file or directory
hello.cc:30:25: error: autosprintf.h: No such file or directory
hello.cc:31: error: `gnu' has not been declared
hello.cc:31: error: expected nested-name-specifier before "autosprintf"
hello.cc:31: error: `autosprintf' has not been declared
hello.cc: In function `int main()':
hello.cc:37: error: 'textdomain' was not declared in this scope
hello.cc:38: error: 'LOCALEDIR' was not declared in this scope
hello.cc:38: error: 'bindtextdomain' was not declared in this scope
hello.cc:40: error: 'gettext' was not declared in this scope
hello.cc:42: error: 'autosprintf' was not declared in this scope

[/usr/local/share/doc/gettext/examples/hello-c++] -bash-2.05b 505$ ls
INSTALL         autoclean.sh    configure.ac    m4
Makefile.am     autogen.sh      hello.cc        po

[/usr/local/share/doc/gettext/examples/hello-c++] -bash-2.05b 506$ cat
hello.cc
// Example for use of GNU gettext.
// Copyright (C) 2003 Free Software Foundation, Inc.
// This file is in the public domain.

// Source code of the C++ program.


// Avoid deprecation warnings from g++ 3.1 or newer.
#if defined __GNUG__ && defined __DEPRECATED
# include <iostream>
using namespace std;
#else
# include <iostream.h>
#endif

// Get setlocale() declaration.
#include <locale.h>

// Get getpid() declaration.
#if HAVE_UNISTD_H
# include <unistd.h>
#endif

// Get gettext(), textdomain(), bindtextdomain() declaration.
#include "gettext.h"
// Define shortcut for gettext().
#define _(string) gettext (string)

// Get autosprintf class declaration.
#include "autosprintf.h"
using gnu::autosprintf;

int
main ()
{
  setlocale (LC_ALL, "");
  textdomain ("hello-c++");
  bindtextdomain ("hello-c++", LOCALEDIR);

  cout << _("Hello, world!") << endl;
  cout << autosprintf (_("This program is running as process number %d."),
                       getpid ())
       << endl;
}
[/usr/local/share/doc/gettext/examples/hello-c++] -bash-2.05b 507$

****************************

on 5/5/06 4:33 AM, Jeff Miller at address@hidden wrote:

> Looks like you need a library, probably gfortran. Here's a link I found:
> http://gcc.gnu.org/fortran/
> 
> 
> On 5/5/06, Agnes Bousquier <address@hidden> wrote:
>> 
>> Hello everyone,
>> 
>>   I recently installed last octave-forge and octave-devel packages on my
>> Fedora core 5 computer from FC's official web site
>> (octave-forge-2006.03.17-4 and octave-devel-2.9.5-3). Although Octave
>> seems to run beautifully, when I try to compile the "hello world" file
>> included in the Octave's package, I get :
>> 
>> $ mkoctfile hello.cc
>> /usr/bin/ld : can not find -lgfortranbegin
>> 
>> I did not find any solution on my google search. Does anybody know what
>> is going wrong?
>> 
>> Thank you very much in advance for your replies
>> 
>> Best regards,
>> 
>> Agnes
>> 
>> _______________________________________________
>> Help-octave mailing list
>> address@hidden
>> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>> 
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]