Re: Cross Correlating Road Grade information




Rune Allnor wrote:
martini wrote:
this still does not compile...

am using the standard matlab compiler in matlab 7.1

I got rid of a lot of errors by declaring all the variables before the
first IF statement

however for some reason the compiler does not recognize the "new double"
in the memory allocation.

I have tried it with the visual c/C++ compiler as well but get this
error:


error C2065: 'new' : undeclared identifier



once again, what compiler are you using..as it seems that it is less picky
than mine

I'm using LCC or Borland v 5.6 under matlab 7.1. I'm not sure
which one is active. This is a C++ program. You can do the
same with C, provided you declare all variables before the first
line of code and use MALLOC (or somethind similar) instead of NEW,
and FREE instead of DELETE.

The easy way to get this to compile, is to run

mex -setup

from the matlab prompt and select the LCC compiler as the
active one.

I forgot: Make sure the filename extension is .cpp, not .c,
so the compiler understands it is dealing with a C++ file.

Rune

BTW, another bug: At one or two places it should be

t0 = 1/sqrt(variance);

(new square root).

Rune

.



Relevant Pages

  • Re: newbie question: creating my first mex-file - compiling on windows xp
    ... > Which compiler should I download in order to get started? ... For mex, LCC that comes wirth matlab suffices for getting started. ... Install the MS Visual studio first, and see if there are more options ...
    (comp.soft-sys.matlab)
  • Re: newbie question: creating my first mex-file - compiling on windows xp
    ... There is a PDF file available at the Matworks site. ... > I found something with google called "Connecting C and matlab" 4 pages. ... >> IDE you will almost certainly find it easier to learn C there. ... I'd go with the compiler with the best IDE ...
    (comp.soft-sys.matlab)
  • Re: Status of Compiler w/ standalone: Dlls, JNI, & Java apps?
    ... Is that still the case with the latest and greatest compiler (or is there ... The JNI C DLL is responsible for initializing the ... and dispatching calls to the MATLAB generated DLL. ... standalone DLL returned before another of its functions was called. ...
    (comp.soft-sys.matlab)
  • Re: Difference between the Compiler and RT Worksho
    ... But the Compiler is restricted to Matlab only, ... create .exe programs based on Simulink Models with RTW. ... Real-Time Workshop, on the other hand, ...
    (comp.soft-sys.matlab)
  • Re: Matlab Compiler 4.0 Exception
    ... >> I just received this error message when using Matlab Compiler ... >> under Windows 2000 when trying to compile a standalone ... >> mcc -m RollerTestTool.m ...
    (comp.soft-sys.matlab)