<?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[Errorcode C3861 nach verwendung einer Biliotheksfunktion]]></title><description><![CDATA[<p>Hallo,<br />
ich habe gerade versucht ein Programmbeispiel von Matrox (Matrox Imaging Library) nachzuprogrammieren. Bei folgendem Quellcode bekomme ich die angesprochene Fehlermeldung:</p>
<pre><code class="language-cpp">/* Regular includes. */
#include &lt;stdio.h&gt;
#include &lt;mil.h&gt;
#include &lt;stdlib.h&gt;

/* Lens characteristics */
#define FOCUS_MAX_NB_POSITIONS         256
#define FOCUS_MIN_POSITION             0
#define FOCUS_MAX_POSITION             255
#define FOCUS_START_POSITION           0
/* Autofocus search properties */
#define FOCUS_MAX_POSITION_VARIATION   32
#define FOCUS_MODE                     M_SMART_SCAN
#define FOCUS_SENSITIVITY              1

/* Autofocus hook function that is responsible to move the lens */
long MFTYPE MoveLensFunction(long HookType, long position, 
                             void MPTYPE *UserDataPtr);

/* Main application function */
/****************************************************************/
void main(void)
{
MIL_ID 
    MilApplication,         /* Application identifier. */
    MilSystem,              /* System identifier. */
    MilDisplay,             /* Display identifier. */
    MilDigitizer,           /* Digitizer identifier. */
    MilImage;               /* Image buffer identifier. */
long FocusPos;              /* Best focus position */

/* Allocate defaults */
MappAllocDefault(M_SETUP, &amp;MilApplication, &amp;MilSystem, &amp;MilDisplay, &amp;MilDigitizer, &amp;MilImage);

/* Grab continuously. */
MdigGrabContinuous(MilDigitizer, MilImage);

/* Pause to show the original image. */
printf(&quot;An autofocus operation will be performed.\n&quot;);
printf(&quot;Press &lt;Enter&gt; to continue.\n&quot;);
getchar();
printf(&quot;Autofocusing...\n&quot;);

/* Perform autofocus by calling the MoveLensFunction iteratively */
MdigFocus (MilDigitizer,
        MilImage,
        M_DEFAULT,
        MoveLensFunction,
        M_NULL,
        FOCUS_MIN_POSITION,
        FOCUS_START_POSITION,
        FOCUS_MAX_POSITION,
        FOCUS_MAX_POSITION_VARIATION,
        FOCUS_MODE + FOCUS_SENSITIVITY, &amp;FocusPos);

/* Print the best focus position and number of iterations*/
printf(&quot;The best focus position is %d.\n&quot;, FocusPos);

printf(&quot;Press &lt;Enter&gt; to end.\n&quot;);
getchar();

/* Free all allocations */
MappFreeDefault(MilApplication, MilSystem, MilDisplay, MilDigitizer, MilImage);
}

/* Autofocus hook function that is responsible to move the lens */
/****************************************************************/
long MFTYPE MoveLensFunction(long HookType, long position, void MPTYPE *UserDataPtr)
{
    /* If focus position must be changed */
    if(HookType == M_CHANGE)
    {
        /* Move the camera lens to the specified
        position using the appropriate interface (e.g. serial port).
        */
        MoveLens(position);//&lt;&lt; hier
    }
    return 0;
}
</code></pre>
<p>Er meckert folgendermaßen:<br />
c:...focus image.cpp(76) : error C3861: 'MoveLens': identifier not found<br />
Dabei mach ich einfach nix anderes als das Programmbeispiel.</p>
<p>*Mod-Edit* die cpp-Tags sind leider nicht kompatibel mit BBCode-Formatierungen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/199046/errorcode-c3861-nach-verwendung-einer-biliotheksfunktion</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 20:01:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/199046.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Nov 2007 12:34:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 13:36:27 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe gerade versucht ein Programmbeispiel von Matrox (Matrox Imaging Library) nachzuprogrammieren. Bei folgendem Quellcode bekomme ich die angesprochene Fehlermeldung:</p>
<pre><code class="language-cpp">/* Regular includes. */
#include &lt;stdio.h&gt;
#include &lt;mil.h&gt;
#include &lt;stdlib.h&gt;

/* Lens characteristics */
#define FOCUS_MAX_NB_POSITIONS         256
#define FOCUS_MIN_POSITION             0
#define FOCUS_MAX_POSITION             255
#define FOCUS_START_POSITION           0
/* Autofocus search properties */
#define FOCUS_MAX_POSITION_VARIATION   32
#define FOCUS_MODE                     M_SMART_SCAN
#define FOCUS_SENSITIVITY              1

/* Autofocus hook function that is responsible to move the lens */
long MFTYPE MoveLensFunction(long HookType, long position, 
                             void MPTYPE *UserDataPtr);

/* Main application function */
/****************************************************************/
void main(void)
{
MIL_ID 
    MilApplication,         /* Application identifier. */
    MilSystem,              /* System identifier. */
    MilDisplay,             /* Display identifier. */
    MilDigitizer,           /* Digitizer identifier. */
    MilImage;               /* Image buffer identifier. */
long FocusPos;              /* Best focus position */

/* Allocate defaults */
MappAllocDefault(M_SETUP, &amp;MilApplication, &amp;MilSystem, &amp;MilDisplay, &amp;MilDigitizer, &amp;MilImage);

/* Grab continuously. */
MdigGrabContinuous(MilDigitizer, MilImage);

/* Pause to show the original image. */
printf(&quot;An autofocus operation will be performed.\n&quot;);
printf(&quot;Press &lt;Enter&gt; to continue.\n&quot;);
getchar();
printf(&quot;Autofocusing...\n&quot;);

/* Perform autofocus by calling the MoveLensFunction iteratively */
MdigFocus (MilDigitizer,
        MilImage,
        M_DEFAULT,
        MoveLensFunction,
        M_NULL,
        FOCUS_MIN_POSITION,
        FOCUS_START_POSITION,
        FOCUS_MAX_POSITION,
        FOCUS_MAX_POSITION_VARIATION,
        FOCUS_MODE + FOCUS_SENSITIVITY, &amp;FocusPos);

/* Print the best focus position and number of iterations*/
printf(&quot;The best focus position is %d.\n&quot;, FocusPos);

printf(&quot;Press &lt;Enter&gt; to end.\n&quot;);
getchar();

/* Free all allocations */
MappFreeDefault(MilApplication, MilSystem, MilDisplay, MilDigitizer, MilImage);
}

/* Autofocus hook function that is responsible to move the lens */
/****************************************************************/
long MFTYPE MoveLensFunction(long HookType, long position, void MPTYPE *UserDataPtr)
{
    /* If focus position must be changed */
    if(HookType == M_CHANGE)
    {
        /* Move the camera lens to the specified
        position using the appropriate interface (e.g. serial port).
        */
        MoveLens(position);//&lt;&lt; hier
    }
    return 0;
}
</code></pre>
<p>Er meckert folgendermaßen:<br />
c:...focus image.cpp(76) : error C3861: 'MoveLens': identifier not found<br />
Dabei mach ich einfach nix anderes als das Programmbeispiel.</p>
<p>*Mod-Edit* die cpp-Tags sind leider nicht kompatibel mit BBCode-Formatierungen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411527</guid><dc:creator><![CDATA[abrissbirne]]></dc:creator><pubDate>Wed, 28 Nov 2007 13:36:27 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 12:43:29 GMT]]></title><description><![CDATA[<p>Die Fehlermeldung ist doch eindeutig - der Compiler kennt die Funktion MoveLens() nicht. Ich würde ja spontan auf einen Tippfehler spekulieren, aber da ich die Matrox-Bibliothek nicht kenne, kann ich da nur raten - schau doch mal in die Doku, wie die Funktion korrekt heißt (und welche(n) Header du dafür benötigst).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411534</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 28 Nov 2007 12:43:29 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 13:07:29 GMT]]></title><description><![CDATA[<p>Sicher ist der Fehler eindeutig. Deshalb umso erstaunlicher. Die schreibweise hab ich schon kontrolliert, aber das stimmt. Ich brauche dafür den mil.h Header.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411550</guid><dc:creator><![CDATA[abrissbirne]]></dc:creator><pubDate>Wed, 28 Nov 2007 13:07:29 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 13:11:50 GMT]]></title><description><![CDATA[<p>Könntest du mal den Code dort oben vernünftig einrücken, damit man etwas erkennt? (btw, gehört die Zeile 48/49 auch zu deinem Programm? wenn ja, geht das wirklich durch den Compiler?)</p>
<p>PS: Und &quot;void main()&quot; war noch nie gültiger C++ Code.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411555</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411555</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 28 Nov 2007 13:11:50 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 13:22:41 GMT]]></title><description><![CDATA[<p>Hier nochmal formatiert:</p>
<p>abrissbirne schrieb:</p>
<blockquote>
<pre><code class="language-cpp">/* Regular includes. */ #include &lt;stdio.h&gt; 
#include &lt;mil.h&gt; 
#include &lt;stdlib.h&gt; /* Lens characteristics */ 
#define FOCUS_MAX_NB_POSITIONS 256 
#define FOCUS_MIN_POSITION 0 
#define FOCUS_MAX_POSITION 255 
#define FOCUS_START_POSITION 0 /* Autofocus search properties */ 
#define FOCUS_MAX_POSITION_VARIATION 32 
#define FOCUS_MODE M_SMART_SCAN 
#define FOCUS_SENSITIVITY 1 /* Autofocus hook function that is responsible to move the lens */ 
long MFTYPE MoveLensFunction(long HookType, long position, void MPTYPE *UserDataPtr); /* Main application function */ /****************************************************************/ void main(void) { MIL_ID MilApplication, /* Application identifier. */ MilSystem, /* System identifier. */ MilDisplay, /* Display identifier. */ MilDigitizer, /* Digitizer identifier. */ MilImage; /* Image buffer identifier. */ long FocusPos; /* Best focus position */ /* Allocate defaults */ MappAllocDefault(M_SETUP, &amp;MilApplication, &amp;MilSystem, &amp;MilDisplay, &amp;MilDigitizer, &amp;MilImage); /* Grab continuously. */ MdigGrabContinuous(MilDigitizer, MilImage); /* Pause to show the original image. */ printf(&quot;An autofocus operation will be performed.\n&quot;); printf(&quot;Press &lt;Enter&gt; to continue.\n&quot;); getchar(); printf(&quot;Autofocusing...\n&quot;); /* Perform autofocus by calling the MoveLensFunction iteratively */ MdigFocus (MilDigitizer, MilImage, M_DEFAULT, MoveLensFunction, M_NULL, FOCUS_MIN_POSITION, FOCUS_START_POSITION, FOCUS_MAX_POSITION, FOCUS_MAX_POSITION_VARIATION, FOCUS_MODE + FOCUS_SENSITIVITY, &amp;FocusPos); /* Print the best focus position and number of iterations*/ printf(&quot;The best focus position is %d.\n&quot;, FocusPos); 32 Camera auto-focus (continued) printf(&quot;Press &lt;Enter&gt; to end.\n&quot;); getchar(); /* Free all allocations */ MappFreeDefault(MilApplication, MilSystem, MilDisplay, MilDigitizer, MilImage); } /* Autofocus hook function that is responsible to move the lens */ /****************************************************************/ long MFTYPE MoveLensFunction(long HookType, long position, void MPTYPE *UserDataPtr) { /* If focus position must be changed */ if(HookType == M_CHANGE) { /* Move the camera lens to the specified position using the appropriate interface (e.g. serial port). */ MoveLens(position);//&lt;&lt; hier } return 0; }
</code></pre>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1411568</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411568</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 28 Nov 2007 13:22:41 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 13:26:28 GMT]]></title><description><![CDATA[<p>Habs komplett neu formatiert. hoffe man kann es so besser lesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411573</guid><dc:creator><![CDATA[abrissbirne]]></dc:creator><pubDate>Wed, 28 Nov 2007 13:26:28 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 14:09:11 GMT]]></title><description><![CDATA[<p>abrissbirne schrieb:</p>
<blockquote>
<p>Habs komplett neu formatiert. hoffe man kann es so besser lesen.</p>
</blockquote>
<p>Danke, schonmal.<br />
Wichtig wäre beim Formatieren, Einrückungen in &quot;Klammerebenen&quot;.<br />
Also z.B. so:</p>
<pre><code class="language-cpp">/* Regular includes. */
#include &lt;stdio.h&gt;
#include &lt;mil.h&gt;
#include &lt;stdlib.h&gt;

/* Lens characteristics */
#define FOCUS_MAX_NB_POSITIONS         256
#define FOCUS_MIN_POSITION             0
#define FOCUS_MAX_POSITION             255
#define FOCUS_START_POSITION           0
/* Autofocus search properties */
#define FOCUS_MAX_POSITION_VARIATION   32
#define FOCUS_MODE                     M_SMART_SCAN
#define FOCUS_SENSITIVITY              1

/* Autofocus hook function that is responsible to move the lens */
long MFTYPE MoveLensFunction(long HookType, long position, 
                             void MPTYPE *UserDataPtr);

/* Main application function */
/****************************************************************/
void main(void)
{
   MIL_ID 
       MilApplication,         /* Application identifier. */
       MilSystem,              /* System identifier. */
       MilDisplay,             /* Display identifier. */
       MilDigitizer,           /* Digitizer identifier. */
       MilImage;               /* Image buffer identifier. */
   long FocusPos;              /* Best focus position */

   /* Allocate defaults */
   MappAllocDefault(M_SETUP, &amp;MilApplication, &amp;MilSystem, &amp;MilDisplay, &amp;MilDigitizer, &amp;MilImage);

   /* Grab continuously. */
   MdigGrabContinuous(MilDigitizer, MilImage);

   /* Pause to show the original image. */
   printf(&quot;An autofocus operation will be performed.\n&quot;);
   printf(&quot;Press &lt;Enter&gt; to continue.\n&quot;);
   getchar();
   printf(&quot;Autofocusing...\n&quot;);

   /* Perform autofocus by calling the MoveLensFunction iteratively */
   MdigFocus (MilDigitizer,
           MilImage,
           M_DEFAULT,
           MoveLensFunction,
           M_NULL,
           FOCUS_MIN_POSITION,
           FOCUS_START_POSITION,
           FOCUS_MAX_POSITION,
           FOCUS_MAX_POSITION_VARIATION,
           FOCUS_MODE + FOCUS_SENSITIVITY, &amp;FocusPos);

   /* Print the best focus position and number of iterations*/
   printf(&quot;The best focus position is %d.\n&quot;, FocusPos);

   printf(&quot;Press &lt;Enter&gt; to end.\n&quot;);
   getchar();

   /* Free all allocations */
   MappFreeDefault(MilApplication, MilSystem, MilDisplay, MilDigitizer, MilImage);
}

/* Autofocus hook function that is responsible to move the lens */
/****************************************************************/
long MFTYPE MoveLensFunction(long HookType, long position, void MPTYPE *UserDataPtr)
{
    /* If focus position must be changed */
    if(HookType == M_CHANGE)
    {
        /* Move the camera lens to the specified
        position using the appropriate interface (e.g. serial port).
        */
        MoveLens(position);//&lt;&lt; hier
    }
    return 0;
}
</code></pre>
<p>Spontan würde ich sagen:<br />
1.) Ist reines C und sollte deswegen entweder in C++ gewandelt werden oder ins entsprechendem Forum verschoben werden</p>
<p>2.) &quot;void man(void)&quot; gibt's IIRC auch in C nicht.</p>
<p>3.) Die Frage bleibt: Wo ist MoveLens() implementiert ?<br />
Sprich: Welcher Code soll in der mit &quot;&lt;&lt;hier&quot; gekennzeichneten Stelle ausgeführt werden ?<br />
Vermutlich ist das in der Matrox-Lib implementiert ... dann musst Du die dem LInker auch &quot;mitgeben&quot; (wie das geht, findest Du in der Beschreibung Deines Compilers/Linkers...</p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411592</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 28 Nov 2007 14:09:11 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 14:42:47 GMT]]></title><description><![CDATA[<p>C3861 ist ein Compiler-Fehler. Linkercodes fangen mit LNK und nicht C an. Wird wohl einfach in einem Header die Funktion fehlen. Kann man doch einfach durch eine Suchfunktion im Windows-Explorer feststellen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411616</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411616</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Wed, 28 Nov 2007 14:42:47 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 14:44:50 GMT]]></title><description><![CDATA[<p>Ja, hab alles in mein Projekt mit aufgenommen. Hab die Bibliothek mil.lib in den Ordner C:\Programme\Microsoft Visual Studio 8\VC\lib hineinkopiert. Danach unter Projekt Properties --&gt; C/C++ --&gt; General --&gt; Additional Include Directories den Pfad zu dem Matrox Includeverzeichnis angegeben und unter Linker --&gt; Input --&gt; Additional Dependencies mil.lib eingegeben. Somit müsste ich es doch korrekt eingebunden haben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411620</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411620</guid><dc:creator><![CDATA[abrissbirne]]></dc:creator><pubDate>Wed, 28 Nov 2007 14:44:50 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Wed, 28 Nov 2007 15:21:04 GMT]]></title><description><![CDATA[<p>Schau mal im Header &lt;mil.h&gt; nach, ob die Funktion 'MoveLens' wirklich so heißt und ob es irgendwelche defines dort gibt, welche evtl. noch aktiviert werden müssen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1411660</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1411660</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Wed, 28 Nov 2007 15:21:04 GMT</pubDate></item><item><title><![CDATA[Reply to Errorcode C3861 nach verwendung einer Biliotheksfunktion on Thu, 29 Nov 2007 08:42:36 GMT]]></title><description><![CDATA[<p>Danke für eure schnellen Hilfsvorschläge. Hab den Täter allen Übels. Wir verwenden hier nur eine abgespeckte Version der MIL, die MIL-LITE und diese besitzt nur Core-Funktionen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1412024</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1412024</guid><dc:creator><![CDATA[abrissbirne]]></dc:creator><pubDate>Thu, 29 Nov 2007 08:42:36 GMT</pubDate></item></channel></rss>