help-octave
[Top][All Lists]
Advanced

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

mkoctfile HelloWorld.cc in Windows


From: szb
Subject: mkoctfile HelloWorld.cc in Windows
Date: Fri, 28 Sep 2007 07:34:01 -0700 (PDT)

Hi,

I am a newbie in this area, so sorry if I seems to be away of the track...
and sorry if this question has already been addressed in any other thread...

I am running on Windows XP and have the "Microsoft Visual Studio 8"
commercial version with SDk and all that.

I have installed octave-2.9.13-setup.exe in the "c:\Programs\..." folder (a
folder without white space), and have tried to compile and run the example
octfile "HelloWorld.cc"

   #include <octave/oct.h>
     
     DEFUN_DLD (helloworld, args, nargout,
       "Hello World Help String")
     {
       int nargin = args.length ();
       octave_stdout << "Hello World has " << nargin 
             << " input arguments and "
             << nargout << " output arguments.\n";
       return octave_value_list ();
     }
     
   
  Running the following command from the DOS prompt:
  
  mkoctfile helloworld.cc
  
  I get lots of compile error (please see below). I wonder if anybody can
help me and tell me what I am doing wrong!!?
  
  Thanks for all the help in advanced
  Suzan


  helloworld.cc
  C:\Program Files\Octave\include\octave-2.9.13\octave/oct-types.h(70) :
error C2632: 'long' followed by 'long' is illegal
  C:\Program Files\Octave\include\octave-2.9.13\octave/oct-types.h(71) :
error C2632: 'long' followed by 'long' is illegal
  C:\Program Files\Octave\include\octave-2.9.13\octave/lo-utils.h(44) :
error C2039: 'FILE' : is not a member of 'std'
  C:\Program Files\Octave\include\octave-2.9.13\octave/lo-utils.h(45) :
error C2039: 'FILE' : is not a member of 'std'
  C:\Program Files\Octave\include\octave-2.9.13\octave/lo-utils.h(47) :
error C2039: 'FILE' : is not a member of 'std'
  C:\Program Files\Octave\include\octave-2.9.13\octave/lo-utils.h(48) :
error C2039: 'FILE' : is not a member of 'std'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(216) :
error C2629: unexpected 'double ('
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(216) :
error C2143: syntax error : missing ';' before '{'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(216) :
error C2447: missing function header (old-style formal list?)
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2377: 'Complex' : redefinition; typedef cannot be overloaded with any
other symbol
          C:\Program
Files\Octave\include\octave-2.9.13\octave/oct-cmplx.h(29) : see declaration
of 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2065: 'r' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2296: '*' : illegal, left operand has type 'class
std::complex<double> *(__cdecl *)(const int *,unsigned int)'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2061: syntax error : identifier 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2143: syntax error : missing ')' before ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
warning C4552: '<' : operator has no effect; expected operator with
side-effect
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(222) :
error C2143: syntax error : missing ',' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(222) :
error C2059: syntax error : '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(222) :
error C2065: 'n' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(222) :
error C2065: 'x' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(222) :
error C2109: subscript requires array or pointer type
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(224) :
error C2556: 'double *__cdecl Complex(const int *,unsigned int)' :
overloaded function differs only by return type from 'class
std::complex<double> *__cdecl Complex(const int *,unsigned int)'
          C:\Program
Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) : see
declaration of 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(224) :
error C2371: 'Complex' : redefinition; different basic types
          C:\Program
Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) : see
declaration of 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(224) :
error C2065: 'mx_inline_make_complex' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2143: syntax error : missing ';' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2433: 'Complex' : 'inline' not permitted on data declarations
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2373: 'Complex' : redefinition; different type modifiers
          C:\Program
Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) : see
declaration of 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2143: syntax error : missing ',' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2059: syntax error : '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2501: 'mx_inline_change_sign' : missing storage-class or type
specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2106: '=' : left operand must be l-value
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2061: syntax error : identifier 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2143: syntax error : missing ')' before ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
warning C4552: '<' : operator has no effect; expected operator with
side-effect
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(227) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(229) :
error C2143: syntax error : missing ',' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(229) :
error C2059: syntax error : '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(229) :
error C2065: 'real' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(229) :
error C2109: subscript requires array or pointer type
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(230) :
error C2143: syntax error : missing ',' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(230) :
error C2059: syntax error : '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(230) :
error C2065: 'imag' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(230) :
error C2109: subscript requires array or pointer type
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2143: syntax error : missing ';' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2433: 'Complex' : 'inline' not permitted on data declarations
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2373: 'Complex' : redefinition; different type modifiers
          C:\Program
Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(217) : see
declaration of 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2143: syntax error : missing ',' before '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2059: syntax error : '*'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2501: 'mx_inline_conj_dup' : missing storage-class or type specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2106: '=' : left operand must be l-value
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2061: syntax error : identifier 'Complex'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2143: syntax error : missing ')' before ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
warning C4552: '<' : operator has no effect; expected operator with
side-effect
  C:\Program Files\Octave\include\octave-2.9.13\octave/mx-inlines.cc(231) :
error C2143: syntax error : missing ';' before ')'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2462: 'MArray2' : cannot define a type in a 'new-expression'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '&'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<T>' : template-class-id redefined as a global data variable
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2065: 'T' : undeclared identifier
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2954: template definitions cannot nest
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '&'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<`template-parameter257'>' : template-class-id redefined as a
global data variable
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2086: 'MArray2<`template-parameter257'>' : redefinition
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2954: template definitions cannot nest
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '<template-id>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<`template-parameter257'>' : template-class-id redefined as a
global data variable
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2501: 'MArray2<`template-parameter257'>' : missing storage-class or type
specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2371: 'MArray2<`template-parameter257'>' : redefinition; different basic
types
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '&'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2954: template definitions cannot nest
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '<template-id>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<`template-parameter257'>' : template-class-id redefined as a
global data variable
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2501: 'MArray2<`template-parameter257'>' : missing storage-class or type
specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2371: 'MArray2<`template-parameter257'>' : redefinition; different basic
types
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '&'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2954: template definitions cannot nest
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '+'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<`template-parameter257'>' : template-class-id redefined as a
global data variable
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2501: 'MArray2<`template-parameter257'>' : missing storage-class or type
specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2371: 'MArray2<`template-parameter257'>' : redefinition; different basic
types
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2954: template definitions cannot nest
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '-'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<`template-parameter257'>' : template-class-id redefined as a
global data variable
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2501: 'MArray2<`template-parameter257'>' : missing storage-class or type
specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2371: 'MArray2<`template-parameter257'>' : redefinition; different basic
types
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2954: template definitions cannot nest
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '<template-id>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2936: 'MArray2<`template-parameter257'>' : template-class-id redefined as a
global data variable
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2501: 'MArray2<`template-parameter257'>' : missing storage-class or type
specifiers
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2371: 'MArray2<`template-parameter257'>' : redefinition; different basic
types
          C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36)
: see declaration of 'MArray2<`template-parameter257'>'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2059: syntax error : ';'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2143: syntax error : missing ';' before '+'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : error
C2146: syntax error : missing ';' before identifier 'T'
  C:\Program Files\Octave\include\octave-2.9.13\octave/MArray2.h(36) : fatal
error C1003: error count exceeds 100; stopping compilation
  LINK : fatal error LNK1181: cannot open input file "helloworld.o"


-- 
View this message in context: 
http://www.nabble.com/mkoctfile-HelloWorld.cc-in-Windows-tf4534898.html#a12941759
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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