Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, August 1999
problems compiling tutorial 7...


Message 1 in thread

First, I like to thank all the people that helped me with tutorial #1, now I'm
on #7 !!!

How I compile tutorial #7??? I tried with 
cc -I/usr/include/qt -o tut7 main.cc -lqt 
but I get this error:
/tmp/ccXKfxtr.o: In function `MyWidget::MyWidget(QWidget *, char const *)':
/tmp/ccXKfxtr.o(.text+0x1b5): undefined reference to `LCDRange::LCDRange(QWidget *, char const *)'
collect2: ld returned 1 exit status

I think it is because like now I'm using more than one .cpp file, I got to
compile it in another way, I'm right??? or what I have to do???

  --
-----------------------
Juan Luis Baptiste M.
Ingeniería de Sistemas
P.U.J.
-----------------------


Message 2 in thread

Juan Luis Baptiste wrote:

> First, I like to thank all the people that helped me with tutorial #1, now I'm
> on #7 !!!
>
> How I compile tutorial #7??? I tried with
> cc -I/usr/include/qt -o tut7 main.cc -lqt
> but I get this error:
> /tmp/ccXKfxtr.o: In function `MyWidget::MyWidget(QWidget *, char const *)':
> /tmp/ccXKfxtr.o(.text+0x1b5): undefined reference to `LCDRange::LCDRange(QWidget *, char const *)'
> collect2: ld returned 1 exit status
>
> I think it is because like now I'm using more than one .cpp file, I got to
> compile it in another way, I'm right??? or what I have to do???
>
>   --
> -----------------------
> Juan Luis Baptiste M.
> Ingeniería de Sistemas
> P.U.J.
> -----------------------
>
> --
> List archive and information: http://www.troll.no/qt-interest/

You think right, you should add all C++ sources to cc this way (there are other ways of compilations)

You should by the book Linux Application Development (Johnson and Troan): chapter 4 and 5 is for you.

cc -I/usr/include/qt -o tut7 main.cc lcdrange.cc xxx.cc yyy.cc -lqt