bugGNU Octave - Bugs: bug #39856, MSVC: cannot compile an oct-file...

 
 

bug #39856: MSVC: cannot compile an oct-file in 64-bit Windows 7 or Vista

Submitter:  Dave Robinson <davewr2013>
Submitted:  Thu 22 Aug 2013 08:14:11 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  3 - Low Item Group:  Incorrect Result
Status:  Invalid Assigned to:  None
Originator Name:  Dave Robinson Open/Closed:  * Closed
Release:  * 3.6.4 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 18 Jan 2016 06:22:33 PM UTC, comment #3: 

Octave on MSVC is essentially best effort and no work has been done on it since version 3.6.4. This bug report stands as good documentation of what to update to get this problem resolved, but nothing needs to be fixed in Octave itself.

Mike Miller <mtmiller>
Group Member
Thu 22 Aug 2013 10:38:02 PM UTC, comment #2: 

I left out one piece of info. Sorry about that!

The math .h file is in
C:\Software\Octave-3.6.4\include

Top of file is:

*

  • This file is part of msvcmath library.
  • Author: Michael Goffioul

 */
#ifndef _MSVCMATHLIB_H_
#define _MSVCMATHLIB_H_

#ifndef _MSC_VER
# error "this header can only be used with Visual C++ compiler"
#endif

/* Make sure math constants are defined */
#ifndef _USE_MATH_DEFINES
# define _USE_MATH_DEFINES
#endif

Dave Robinson <davewr2013>
Thu 22 Aug 2013 09:00:45 PM UTC, comment #1: 

math.h isn't an Octave file.

What do we need to change in Octave?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Thu 22 Aug 2013 08:14:11 PM UTC, original submission:  

This applies to the Ocatve Version configured for WIndows install -- Microsoft Visual Studio 2010 version

The Dynamically Linked Function example Oct-File example in the manual at page 669 (685 of PDF) will not compile.

The compiler indicates that the mkoctfile compiler is not available -- actually it is a broken link to the Microsoft Visual Studio C compiler.

The following is a simple change that will allow compiling an oct file in Windows 7 and Windows Vista 64

Line 74 of math.h needs to be changed to compile if a 32 bit compiler is used -- like the C Express compilers.

Note that the only change is to add "(x86)" to line 74 as indicated.

/* Include VC++ original math.h */
#include <c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/include/math.h>

Using this batch file from a command prompt in the home directory appears to start Octane 3.6 correctly. This assumes that the Microsoft Visual Studio Express 2010 C++ compiler is installed.


*******************
echo off
cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\
call vcvarsall.bat x86
cd C:\Software\Octave-3.6.4\
bin\octave-3.6.4.exe
***********************



Dave Robinson <davewr2013>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by davewr2013 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-01-18 mtmiller StatusNeed Info Invalid
        Open/ClosedOpen Closed
    2015-02-22 mtmiller Priority5 - Normal 3 - Low
        SummaryCannot compile an Oct-File in Windows 7 64 or Vista 64 oct file MSVC: cannot compile an oct-file in 64-bit Windows 7 or Vista
    2013-10-24 rik5 CategoryNone Configuration and Build System
    2013-08-22 jordigh StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code