<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Unklare Compilerfehlermeldung]]></title><description><![CDATA[<p>So sieht meine Klasse aus:</p>
<pre><code class="language-cpp">class Fourier {
	public:
		...

		Fourier( int K_, double* Xtrain_, int XTrainLength_, double* Xtest_, int XTestLength_, double* L_, double* centers_, int centersLength_, double* alphas_, double sigma_ );
...
};

...

Fourier::Fourier( int K_, double* Xtrain_, int XTrainLength_, double* Xtest_, int XTestLength_, double* L_, double* centers_, int centersLength_, double* alphas_, double sigma_ ) {
...
}
</code></pre>
<p>Und so erzeuge ich ein Objekt:</p>
<pre><code class="language-cpp">Fourier fourier( K, Xtrain, XtrainLength, Xtest, XtestLength, L, centers, centersLength, alphas, sigma );
</code></pre>
<p>Wenn ich es kompiliere erhalte ich folgende Fehlermeldung:</p>
<blockquote>
<p>make<br />
g++ -fPIC -ansi -DMX_COMPAT_32 -DMATLAB_MEX_FILE -I/Applications/MATLAB_R2009b.app/extern/include -c FourierDifference7D.cpp<br />
FourierDifference7D.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:<br />
FourierDifference7D.cpp:180: error: no matching function for call to ‘Fourier::Fourier(int&amp;, double*&amp;, int&amp;, double*&amp;, int&amp;, double&amp;, double*&amp;, int&amp;, double*&amp;, double&amp;)’<br />
FourierDifference7D.cpp:39: note: candidates are: Fourier::Fourier(int, double*, int, double*, int, double*, double*, int, double*, double)<br />
FourierDifference7D.cpp:12: note: Fourier::Fourier(const Fourier&amp;)<br />
make: *** [FourierDifference7D.o] Error 1</p>
</blockquote>
<p>Was mache ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/285318/unklare-compilerfehlermeldung</link><generator>RSS for Node</generator><lastBuildDate>Fri, 21 Aug 2026 09:42:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/285318.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 18 Apr 2011 11:44:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unklare Compilerfehlermeldung on Mon, 18 Apr 2011 11:44:21 GMT]]></title><description><![CDATA[<p>So sieht meine Klasse aus:</p>
<pre><code class="language-cpp">class Fourier {
	public:
		...

		Fourier( int K_, double* Xtrain_, int XTrainLength_, double* Xtest_, int XTestLength_, double* L_, double* centers_, int centersLength_, double* alphas_, double sigma_ );
...
};

...

Fourier::Fourier( int K_, double* Xtrain_, int XTrainLength_, double* Xtest_, int XTestLength_, double* L_, double* centers_, int centersLength_, double* alphas_, double sigma_ ) {
...
}
</code></pre>
<p>Und so erzeuge ich ein Objekt:</p>
<pre><code class="language-cpp">Fourier fourier( K, Xtrain, XtrainLength, Xtest, XtestLength, L, centers, centersLength, alphas, sigma );
</code></pre>
<p>Wenn ich es kompiliere erhalte ich folgende Fehlermeldung:</p>
<blockquote>
<p>make<br />
g++ -fPIC -ansi -DMX_COMPAT_32 -DMATLAB_MEX_FILE -I/Applications/MATLAB_R2009b.app/extern/include -c FourierDifference7D.cpp<br />
FourierDifference7D.cpp: In function ‘void mexFunction(int, mxArray**, int, const mxArray**)’:<br />
FourierDifference7D.cpp:180: error: no matching function for call to ‘Fourier::Fourier(int&amp;, double*&amp;, int&amp;, double*&amp;, int&amp;, double&amp;, double*&amp;, int&amp;, double*&amp;, double&amp;)’<br />
FourierDifference7D.cpp:39: note: candidates are: Fourier::Fourier(int, double*, int, double*, int, double*, double*, int, double*, double)<br />
FourierDifference7D.cpp:12: note: Fourier::Fourier(const Fourier&amp;)<br />
make: *** [FourierDifference7D.o] Error 1</p>
</blockquote>
<p>Was mache ich falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2051052</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2051052</guid><dc:creator><![CDATA[HändyÄndy]]></dc:creator><pubDate>Mon, 18 Apr 2011 11:44:21 GMT</pubDate></item><item><title><![CDATA[Reply to Unklare Compilerfehlermeldung on Mon, 18 Apr 2011 11:49:15 GMT]]></title><description><![CDATA[<p>Da stimmen die Typen nicht ganz. Zeig mal die Deklaration der Variablen, die du übergibst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2051053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2051053</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Mon, 18 Apr 2011 11:49:15 GMT</pubDate></item><item><title><![CDATA[Reply to Unklare Compilerfehlermeldung on Mon, 18 Apr 2011 12:03:25 GMT]]></title><description><![CDATA[<p>Die Metode die so ein Fourier Objekt erzeugt sieht wie folgt aus (es handelt sich dabei um ein Plugin für das Programm matlab):</p>
<pre><code class="language-cpp">void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[] ) {

	if( nrhs &lt; 7 )
		mexErrMsgTxt(&quot;[f,g] = FourierDifference7D( Xtrain, Xtest, centers, L, sigma, alpha, K )\n&quot;);

	const mwSize* dimsCount1 = mxGetDimensions(prhs[0]);
	if( dimsCount1[1] != 7 || (dimsCount1[0] &lt; dimsCount1[1]))
		mexErrMsgTxt(&quot;First argument (Xtrain) must be a Nx7 data matrix.\n&quot;);
	double *Xtrain = mxGetPr(prhs[0]);
	int XtrainLength = dimsCount1[0];

	const mwSize* dimsCount2 = mxGetDimensions(prhs[1]);
	if( dimsCount2[1] != 7 || (dimsCount2[0] &lt; dimsCount2[1]))
		mexErrMsgTxt(&quot;Second argument (Xtest) must be a Nx7 data matrix.\n&quot;);
	double *Xtest = mxGetPr(prhs[1]);
	int XtestLength = dimsCount2[0];

	const mwSize* dimsCount3 = mxGetDimensions(prhs[2]);
	if( dimsCount3[1] != 7 || (dimsCount3[0] &lt; dimsCount3[1]))
		mexErrMsgTxt(&quot;Third argument (centers) must be a Nx7 data matrix.\n&quot;);
	double *centers = mxGetPr(prhs[2]);
	int centersLength = dimsCount3[1];

	const mwSize* dimsCount4 = mxGetDimensions(prhs[3]);
	if( dimsCount4[0] != 1 || dimsCount4[1] != 7 )
		mexErrMsgTxt(&quot;Fourth argument (L) must be a 1x7 vector of period lengths.\n&quot;);
	double L = *mxGetPr(prhs[3]);

	const mwSize* dimsCount5 = mxGetDimensions(prhs[4]);
	if( dimsCount5[0] != 1 || dimsCount5[1] != 1 )
		mexErrMsgTxt(&quot;Fifth argument (sigma) must be a scalar.\n&quot;);
	double sigma = *(mxGetPr(prhs[4]));

	const mwSize* dimsCount6 = mxGetDimensions(prhs[5]);
	if( !( dimsCount6[0] == centersLength || dimsCount6[1] == centersLength ) )	
		mexErrMsgTxt(&quot;Sixth argument (alpha) must be the same length as centers.\n&quot;);
	double *alphas = mxGetPr(prhs[5]);

	const mwSize* dimsCount7 = mxGetDimensions(prhs[6]);
	if( dimsCount7[0] != 1 || dimsCount7[1] != 1 )
		mexErrMsgTxt(&quot;Eighth argument (K) must be a scalar.\n&quot;);
	int K = (int) *(mxGetPr(prhs[6]));

	if( nlhs &lt; 1  )
		mexErrMsgTxt(&quot;Return value is missing.\n[f,g] = FourierDifference7D( Xtrain, Xtest, centers, L, sigma, alpha, K )\n&quot;);

	plhs[0] = mxCreateDoubleScalar(0.0);
	double* f = mxGetPr(plhs[0]);

	Fourier fourier( K, Xtrain, XtrainLength, Xtest, XtestLength, L, centers, centersLength, alphas, sigma );
        ...
</code></pre>
<p>Die Methde mxGetPr(prhs[6]) liefert immer einen Pointer vom Typ Double zurück (<a href="http://www.mathworks.com/help/techdoc/apiref/mxgetpr.html" rel="nofollow">http://www.mathworks.com/help/techdoc/apiref/mxgetpr.html</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2051059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2051059</guid><dc:creator><![CDATA[HändyÄndy]]></dc:creator><pubDate>Mon, 18 Apr 2011 12:03:25 GMT</pubDate></item><item><title><![CDATA[Reply to Unklare Compilerfehlermeldung on Mon, 18 Apr 2011 12:09:05 GMT]]></title><description><![CDATA[<p>Hoppla hab den Fehler gefunden. Ich hatte ausversehen</p>
<p>double L = *mxGetPr(prhs[3]);</p>
<p>geschrieben es muss aber</p>
<p>double* L = mxGetPr(prhs[3]);</p>
<p>lauten.</p>
<p>Vielen Dank für Eure Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2051065</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2051065</guid><dc:creator><![CDATA[HändyÄndy]]></dc:creator><pubDate>Mon, 18 Apr 2011 12:09:05 GMT</pubDate></item><item><title><![CDATA[Reply to Unklare Compilerfehlermeldung on Mon, 18 Apr 2011 12:46:44 GMT]]></title><description><![CDATA[<p>Wenn du jetzt noch die Fehlermeldung verstehst ist alles gut.<br />
Die besagt nämlich ziemlich genau was das Problem ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2051085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2051085</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Mon, 18 Apr 2011 12:46:44 GMT</pubDate></item><item><title><![CDATA[Reply to Unklare Compilerfehlermeldung on Mon, 18 Apr 2011 13:08:57 GMT]]></title><description><![CDATA[<p>Dass du bei der Fehlermeldung nicht durchblickst hat ne ganz einfache Ursache, nämlich dass du eine widerlich lange Parameterliste hast. Das sieht aus, als könnte man an einigen Stellen Pointer+Längenangaben durch Container ersetzen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2051104</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2051104</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Mon, 18 Apr 2011 13:08:57 GMT</pubDate></item></channel></rss>