 <p><strong>Real problem in short:</strong> Circular library dependency between <code>arch</code> and <code>synergy</code>. Also, <code>base</code> actually wasn't linked to <code>common</code> library (in the CMakeLists.txt for <code>base</code>).</p> <p>Interestingly, this was caused by a configuration problem in the CMakeLists.txt files for the libraries. This had nothing to do with the CMakeLists.txt for the new <code>synergyd</code> application I had added.</p> <p>The problem was that I did not link the libraries to each other where new calls were added to classes in other libraries. However, it seems that there is now a problem with circular linking.</p> <p>For example, I could have added...</p> <pre><code>if (UNIX) target_link_libraries(arch synergy) endif() </code></pre> <p>... to CMakeLists.txt in the <code>arch</code> library, as <code>arch</code> now calls something in the <code>synergy</code> library. But this is invalid, since <code>synergy</code> already calls something in <code>arch</code>.</p> <p>Apparently this doesn't matter on Windows.</p> <p>I'm not quite sure though what caused this to start happening, as it's all old code that has been compiling fine before, and still does in other applications. I suspect most likely something to do with the recent removal of boiler plate from CArch, rather than something that CDaemonApp is doing (or maybe even a combination of both).</p> <h1>Update</h1> <p>Just in case anyone cares ;-) -- I think it is something to do with the relation between the lousy circular library dependency between <code>arch</code> and <code>synergy</code>, combined with the fact that <code>CDaemonApp.cpp</code> wasn't including <code>CApp.h</code> -- meaning that it was included at some other point, causing the weird undefined reference errors.</p> <p>To solve this properly, I have removed the circular dependency, which appeared to be the core of the problem.</p> <h1>Update 2</h1> <p>The code now fully compiles, hurrah! </p> <p>I was still seeing one last error (the topic of this question):</p> <pre><code>[ 90%] Building CXX object src/cmd/synergyd/CMakeFiles/synergyd.dir/synergyd.o Linking CXX executable ../../../../../bin/debug/synergyd ../../../../../lib/debug/libbase.a(CLog.o): In function `CLog::insert(ILogOutputter*, bool)': /home/nick/Projects/synergy/branches/1.4/src/lib/base/CLog.cpp:213: undefined reference to `kAppVersion' collect2: ld returned 1 exit status make[2]: *** [../../bin/debug/synergyd] Error 1 make[1]: *** [src/cmd/synergyd/CMakeFiles/synergyd.dir/all] Error 2 make: *** [all] Error 2 </code></pre> <p>This was simply caused by the <code>base</code> library not linking to the <code>common</code> library. Adding the following code to the CMakeLists.txt file for base fixed this:</p> <pre><code>if (UNIX) target_link_libraries(base common) endif() </code></pre> <p>Still not sure exactly why this started happening, just glad it's fixed.</p> <h1>Update 3</h1> <p>And here's the commit: <a href="http://code.google.com/p/synergy-plus/source/detail?r=1354" rel="nofollow">r1354</a></p>