Note that there are some explanatory texts on larger screens.

plurals
  1. POUndefined references when trying to use Borland headers on Linux
    primarykey
    data
    text
    <p>Compiler Error Output:</p> <pre><code>"/usr/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf gmake[1]: Entering directory `/home/josh/Projects/Maze/Charon' "/usr/bin/gmake" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/charon gmake[2]: Entering directory `/home/josh/Projects/Maze/Charon' mkdir -p build/Debug/GNU-Linux-x86/sys rm -f build/Debug/GNU-Linux-x86/sys/charon.o.d g++ -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/sys/charon.o.d -o build/Debug/GNU-Linux-x86/sys/charon.o sys/charon.cpp mkdir -p dist/Debug/GNU-Linux-x86 g++ -o dist/Debug/GNU-Linux-x86/charon build/Debug/GNU-Linux-x86/sys/charon.o build/Debug/GNU-Linux-x86/main.o build/Debug/GNU-Linux-x86/sys/chin.o build/Debug/GNU-Linux-x86/sys/chout.o build/Debug/GNU-Linux-x86/sys/chin.o: In function `chio::chin_::check()': </code></pre> <p>This right here is what I am struggling with. I painstakingly setup the library I use for these functions so I don't know what I fubar'd</p> <pre><code>/home/josh/Projects/Maze/Charon/sys/chin.cpp:28: undefined reference to `kbhit' /home/josh/Projects/Maze/Charon/sys/chin.cpp:33: undefined reference to `stdscr' /home/josh/Projects/Maze/Charon/sys/chin.cpp:33: undefined reference to `wgetch' /home/josh/Projects/Maze/Charon/sys/chin.cpp:35: undefined reference to `kbhit' collect2: ld returned 1 exit status gmake[2]: *** [dist/Debug/GNU-Linux-x86/charon] Error 1 gmake[2]: Leaving directory `/home/josh/Projects/Maze/Charon' gmake[1]: *** [.build-conf] Error 2 gmake[1]: Leaving directory `/home/josh/Projects/Maze/Charon' gmake: *** [.build-impl] Error 2 BUILD FAILED (exit value 2, total time: 1s) </code></pre> <p>Here is the cpp file chin.cpp</p> <pre><code>/* * File: chin.cpp * Author: josh * * Created on 08 April 2012, 10:00 */ #include &lt;iostream&gt; #include &lt;borland/conio.h&gt; #include &lt;ncurses.h&gt; #include &lt;deque&gt; #include "../headers/charon.h" using namespace std; using namespace charon; using namespace chio; namespace chio { chin_::chin_(){} chin_::chin_(charon_ &amp;handle) { engine = &amp;handle; //key_presses = new deque(); } chin_::~chin_() { } bool chin_::check() { if(kbhit()) { while(true) { char ch; ch = getch(); key_presses.push_back(ch); if(!kbhit()) return true; } } return false; } void chin_::update() { while(stream_in) { check(); } } } </code></pre> <p>So at the top of that file you can see that I include borland/conio.h When I was searching for a particular function I used all the time back in the day I found it was in conio.h which has something to do with borland, a compiler if I remember correctly. I had to install dev-c++ bloodshed on windows, grab the include directory I then renamed it to borland and popped it into my linux box's include directory.</p> <p>I had one compile error originally about a dependency within a header, either conio itself or one it used, and all I did was change it so that it pointed to the correct place.</p> <p>Now I don't know what the heck is going on because I expected the compiler to simply find all of those. It finds the header file so the only thing I can think of is maybe the header isn't able to find hpp files, but then why isn't it saying that instead of specifying the functions within said hypothetical hpp files. So since I am into hypothetical situations here, I clearly need some help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload