User forums > Using Code::Blocks
Code::Blocks not compiling .cpp files well under Ubuntu
srepuac:
Hi all, I've installed code::blocks on my Ubuntu Desktop at work :), But for some reason, it gives me all kinds of weird errors when I try to compile a c++ file. C files on the other hand compile just fine.
My feeling is that I must be making a very stupid mistake, which is why I am not including the verbose, unless you think you need it.
Best Regards,
Srepuac :
:?
srepuac:
Umm, after experimenting a bit, it seems to happen only if I use the curses library, ansi c++ seems to compile fine.
The following simple program doesn't compile:
#include <ncurses.h>
int main()
{
initscr();
printw("%s", "hello world");
refresh();
endwin();
}
Codeblocks verboses the following:
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x833)||undefined reference to `dlopen'|
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x84d)||undefined reference to `dlsym'|
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x866)||undefined reference to `dlsym'|
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x87f)||undefined reference to `dlsym'|
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x898)||undefined reference to `dlsym'|
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x8b5)||undefined reference to `dlclose'|
||=== Build finished: 6 errors, 0 warnings ===|
MortenMacFly:
--- Quote from: srepuac on June 17, 2008, 02:21:28 pm ---/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x833)||undefined reference to `dlopen'|
/usr/lib/libcurses.a(lib_mouse.o)||In function `_nc_mouse_init':|
(.text+0x84d)||undefined reference to `dlsym'|
[...]
--- End quote ---
http://www.google.com/search?q=undefined%20reference%20to%20%60dlopen'%7C
srepuac:
Umm, nice, but i can compile well with ubuntu's command line, my problem seems to be related to library linking in code::blocks or something. Anyone?
Barking_Mad:
Post your project & build settings pls :)
EDIT: Also the successful command line build string may help.
Navigation
[0] Message Index
[#] Next page
Go to full version