<?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[C++ undefined reference]]></title><description><![CDATA[<pre><code>class DCF77 {
private:

    //Private variables
    bool _initialized;  

    static int dCF77Pin;
    static int dCFinterrupt;
    static byte pulseStart;
	static volatile bool TestToggle;

    // DCF77 and internal timestamps
    static time_t previousUpdatedTime;
    static time_t latestupdatedTime;            
    static  time_t processingTimestamp;
    static  time_t previousProcessingTimestamp;     
    static unsigned char CEST;
    // DCF time format structure
    struct DCF77Buffer {
      //unsigned long long prefix       :21;
      unsigned long long prefix     :17;
      unsigned long long CEST       :1; // CEST 
      unsigned long long CET        :1; // CET 
      unsigned long long unused     :2; // unused bits
      unsigned long long Min        :7; // minutes
      unsigned long long P1         :1; // parity minutes
      unsigned long long Hour       :6; // hours
      unsigned long long P2         :1; // parity hours
      unsigned long long Day        :6; // day
      unsigned long long Weekday    :3; // day of week
      unsigned long long Month      :5; // month
      unsigned long long Year       :8; // year (5 -&gt; 2005)
      unsigned long long P3         :1; // parity
    };

    // DCF Parity format structure
    struct ParityFlags{
        unsigned char parityFlag    :1;
        unsigned char parityMin     :1;
        unsigned char parityHour    :1;
        unsigned char parityDate    :1;
    } static flags;

    // Parameters shared between interupt loop and main loop

    static volatile bool FilledBufferAvailable;
    static volatile unsigned long long filledBuffer;
    static volatile time_t filledTimestamp;

    // DCF Buffers and indicators
    static int  bufferPosition;
    static unsigned long long runningBuffer;
    static unsigned long long processingBuffer;

    // Pulse flanks
    static   int  leadingEdge;
    static   int  trailingEdge;
    static   int  PreviousLeadingEdge;
    static   bool Up;
    static   bool Test;

    //Private functions
    void static initialize(void);
    void static bufferinit(void);
    void static finalizeBuffer(void);
    static bool receivedTimeUpdate(void);
    void static storePreviousTime(void);
    void static calculateBufferParities(void);
    bool static processBuffer(void);
    void static appendSignal(unsigned char signal);

public: 
    // Public Functions
	//static  int Test;
    DCF77(int DCF77Pin, int DCFinterrupt, bool OnRisingFlank=true); 

    static time_t getTime(void);
    static time_t getUTCTime(void);
    static void Start(void);
    static void Stop(void);
    static void int0handler();

 };
</code></pre>
<pre><code>void DCF77::initialize(void) 
{	
	leadingEdge           = 0;
	trailingEdge          = 0;
	PreviousLeadingEdge   = 0;
	Up                    = false;
	Test                  = false;

	runningBuffer		  = 0;
	FilledBufferAvailable = false;
	bufferPosition        = 0;
	flags.parityDate      = 0;
	flags.parityFlag      = 0;
	flags.parityHour      = 0;
	flags.parityMin       = 0;
	CEST				  = 0;
	}
</code></pre>
<p>Hallo ich habe da eine C++ Lib welche ich um die Variable Test erweitern möchte.<br />
Eigentlich keine große Sache !!! Nur dummerweise bekomme ich vom Compiler</p>
<p>C:\Users\ats37\AppData\Local\Temp\build931a4349f13bf1ae47b203afdc2fcf92.tmp\libraries\DCF77\DCF77.cpp.o: In function `DCF77::initialize()':</p>
<p>D:\__Dokus\Documents\Arduino\libraries\DCF77/DCF77.cpp:67: undefined reference to `DCF77::Test'</p>
<p>collect2.exe: error: ld returned 1 exit status</p>
<p>zu hören. Eigentlich ist Test genauso wie Up deklariert!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/339786/c-undefined-reference</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 21:24:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/339786.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Sep 2016 09:41:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 09:41:30 GMT]]></title><description><![CDATA[<pre><code>class DCF77 {
private:

    //Private variables
    bool _initialized;  

    static int dCF77Pin;
    static int dCFinterrupt;
    static byte pulseStart;
	static volatile bool TestToggle;

    // DCF77 and internal timestamps
    static time_t previousUpdatedTime;
    static time_t latestupdatedTime;            
    static  time_t processingTimestamp;
    static  time_t previousProcessingTimestamp;     
    static unsigned char CEST;
    // DCF time format structure
    struct DCF77Buffer {
      //unsigned long long prefix       :21;
      unsigned long long prefix     :17;
      unsigned long long CEST       :1; // CEST 
      unsigned long long CET        :1; // CET 
      unsigned long long unused     :2; // unused bits
      unsigned long long Min        :7; // minutes
      unsigned long long P1         :1; // parity minutes
      unsigned long long Hour       :6; // hours
      unsigned long long P2         :1; // parity hours
      unsigned long long Day        :6; // day
      unsigned long long Weekday    :3; // day of week
      unsigned long long Month      :5; // month
      unsigned long long Year       :8; // year (5 -&gt; 2005)
      unsigned long long P3         :1; // parity
    };

    // DCF Parity format structure
    struct ParityFlags{
        unsigned char parityFlag    :1;
        unsigned char parityMin     :1;
        unsigned char parityHour    :1;
        unsigned char parityDate    :1;
    } static flags;

    // Parameters shared between interupt loop and main loop

    static volatile bool FilledBufferAvailable;
    static volatile unsigned long long filledBuffer;
    static volatile time_t filledTimestamp;

    // DCF Buffers and indicators
    static int  bufferPosition;
    static unsigned long long runningBuffer;
    static unsigned long long processingBuffer;

    // Pulse flanks
    static   int  leadingEdge;
    static   int  trailingEdge;
    static   int  PreviousLeadingEdge;
    static   bool Up;
    static   bool Test;

    //Private functions
    void static initialize(void);
    void static bufferinit(void);
    void static finalizeBuffer(void);
    static bool receivedTimeUpdate(void);
    void static storePreviousTime(void);
    void static calculateBufferParities(void);
    bool static processBuffer(void);
    void static appendSignal(unsigned char signal);

public: 
    // Public Functions
	//static  int Test;
    DCF77(int DCF77Pin, int DCFinterrupt, bool OnRisingFlank=true); 

    static time_t getTime(void);
    static time_t getUTCTime(void);
    static void Start(void);
    static void Stop(void);
    static void int0handler();

 };
</code></pre>
<pre><code>void DCF77::initialize(void) 
{	
	leadingEdge           = 0;
	trailingEdge          = 0;
	PreviousLeadingEdge   = 0;
	Up                    = false;
	Test                  = false;

	runningBuffer		  = 0;
	FilledBufferAvailable = false;
	bufferPosition        = 0;
	flags.parityDate      = 0;
	flags.parityFlag      = 0;
	flags.parityHour      = 0;
	flags.parityMin       = 0;
	CEST				  = 0;
	}
</code></pre>
<p>Hallo ich habe da eine C++ Lib welche ich um die Variable Test erweitern möchte.<br />
Eigentlich keine große Sache !!! Nur dummerweise bekomme ich vom Compiler</p>
<p>C:\Users\ats37\AppData\Local\Temp\build931a4349f13bf1ae47b203afdc2fcf92.tmp\libraries\DCF77\DCF77.cpp.o: In function `DCF77::initialize()':</p>
<p>D:\__Dokus\Documents\Arduino\libraries\DCF77/DCF77.cpp:67: undefined reference to `DCF77::Test'</p>
<p>collect2.exe: error: ld returned 1 exit status</p>
<p>zu hören. Eigentlich ist Test genauso wie Up deklariert!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2509955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2509955</guid><dc:creator><![CDATA[ats3788]]></dc:creator><pubDate>Wed, 28 Sep 2016 09:41:30 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 10:05:24 GMT]]></title><description><![CDATA[<p>ats3788 schrieb:</p>
<blockquote>
<p>Eigentlich ist Test genauso wie Up deklariert!</p>
</blockquote>
<p>Es muss aber auch irgendwo <strong>definiert</strong> werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2509957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2509957</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 28 Sep 2016 10:05:24 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 15:38:29 GMT]]></title><description><![CDATA[<p>Danke für die Antwort<br />
Was meint Du mit definiert werden, wo ist Up definiert ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510018</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510018</guid><dc:creator><![CDATA[ats3788]]></dc:creator><pubDate>Wed, 28 Sep 2016 15:38:29 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 17:30:55 GMT]]></title><description><![CDATA[<p>Hast du mal in den Dateien nach Up gesucht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510044</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Wed, 28 Sep 2016 17:30:55 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 18:44:44 GMT]]></title><description><![CDATA[<p>ats3788 schrieb:</p>
<blockquote>
<p>Danke für die Antwort<br />
Was meint Du mit definiert werden, wo ist Up definiert ?</p>
</blockquote>
<p>Sehr wahrscheinlich nicht in einer Header-Datei, sondern in einer cpp - Datei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510057</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510057</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 28 Sep 2016 18:44:44 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 19:03:55 GMT]]></title><description><![CDATA[<p>Mal ne ganz generelle Frage: warum gibt es in der Klasse so viele statische Variablen? Ich kann mir nicht vorstellen, dass dies ein sinnvolles Klassendesign ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510059</guid><dc:creator><![CDATA[wob]]></dc:creator><pubDate>Wed, 28 Sep 2016 19:03:55 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 20:30:46 GMT]]></title><description><![CDATA[<p>ersl mal danke für die Antworten<br />
Ich habe das hier gepostet weil ihr in der rEGEL RICHTIG FÄHIG SEIT <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
das ist für ardunio's<br />
<a href="http://thijs.elenbaas.net/downloads/?did=1" rel="nofollow">http://thijs.elenbaas.net/downloads/?did=1</a><br />
warum DAS SO DEKLARIERT IST keine Ahnung ich komme aus der Pascal Welt<br />
Ich wollte nur wissen ob mein <strong>bool Test</strong> Sinn macht oder nicht Ich wollte mich von C nach C++ bewegen und habe das mit C++ Seattle<br />
nachgebildet und keinen Fehler erhalten aber mit dem Arduino Compiler habe ich das Problem und ich weiß nicht was ich falsch mache. Wenn das so konform<br />
ist auch gut dann muß ich ein Case im Arduino Forum aufmachen.<br />
C C++ ist eben nun mal State of the Art für µMCU's</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2510066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510066</guid><dc:creator><![CDATA[ats3788]]></dc:creator><pubDate>Wed, 28 Sep 2016 20:30:46 GMT</pubDate></item><item><title><![CDATA[Reply to C++ undefined reference on Wed, 28 Sep 2016 20:41:41 GMT]]></title><description><![CDATA[<p>ats3788 schrieb:</p>
<blockquote>
<p>ich weiß nicht was ich falsch mache.</p>
</blockquote>
<p>Statische Klassenvariablen müssen außerhalb der Klassendeklaration definiert werden. Für Up zum Beispiel muss es in irgendeiner Deiner Quelldateien auch eine Definition geben. Durchsuch Deine Quelldateien mal nach</p>
<pre><code>DCF77::Up
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2510067</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2510067</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Wed, 28 Sep 2016 20:41:41 GMT</pubDate></item></channel></rss>