[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Undefined reference problem on 1.0.9
From: |
Jakub Zawierucha |
Subject: |
Undefined reference problem on 1.0.9 |
Date: |
Fri, 02 May 2003 12:28:26 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; PL; rv:1.3b) Gecko/20030210 |
Hi there... this is my first battle with CommonC++ (and automake so...
don't angry :) )
When i try to use CommonC++ in my program i get error at linking stage:
address@hidden:/vol/home/t3q/src/koszty$ make
Making all in src
make[1]: Entering directory `/vol/home/t3q/src/koszty/src'
c++ -g -O2 -o koszty Main.o -lstdc++ -lccgnu2 -lpthread -ldl
Main.o: In function `basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> >::replace(unsigned int, unsigned int,
char const *, unsigned int)':
/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/std/bastring.cc:156:
undefined reference to `ost::UnixSocket::UnixSocket(char const *, int)'
collect2: ld returned 1 exit status
make[1]: *** [koszty] Error 1
make[1]: Leaving directory `/vol/home/t3q/src/koszty/src'
make: *** [all-recursive] Error 1
address@hidden:/vol/home/t3q/src/koszty$
This is my makefile.am:
address@hidden:/vol/home/t3q/src/koszty/src$ cat Makefile.am
MAINTAINERCLEANFILES = Makefile.in Makefile
CXXFLAGS = @CXXFLAGS@ $(THREAD_FLAGS)
LDADD = -lstdc++ -lccgnu2 -lpthread -ldl
noinst_PROGRAMS = koszty
#koszty_HEADERS =
koszty_SOURCES = Main.cc
koszty_LDADD = $(LDADD)
And this is code:
address@hidden:/vol/home/t3q/src/koszty/src$ cat Main.cc
#include <cc++/unix.h>
using namespace ost;
using namespace std;
int main ( int argc, char *argv )
{
UnixSocket *usock;
usock = new UnixSocket ("my.sock");
delete usock;
return 0;
}
Thanx for any help !
Jakub Zawierucha
- Undefined reference problem on 1.0.9,
Jakub Zawierucha <=