arlenagha
12-02-2002, 11:01 PM
i start a new project in Anjuta 1.0.0 and put this code in the main.cc file:
/////////////////////////////////////////////////////////
#include <qapplication.h>
#include <qpushbutton.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
a.setMainWidget( &hello );
hello.show();
return a.exec();
}
///////////////////////////////////////////////////////////
i also edit the Settings and add $QTDIR/include for Include Paths,$QTDIR/lib for Library Paths, and qt for Libraries.
Anjuta compiles without any errors but once i try to build it i get this:
//////////////////////////////////////////////////////////
Building source directory of the Project: cube ...
make --keep-going
cd .. && \
/bin/sh /home/Arlen/Projects/cube/missing --run automake-1.6 --gnu src/Makefile
cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
/bin/sh ../libtool --mode=link g++ -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wtraditional -Wpointer-arith -Wmissing-prototypes -O1 -g -o cube -LTDIR/lib main.o -lqt
../libtool: line 1: cd: TDIR/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `TDIR/lib'
make: *** [cube] Error 1
make: Target `all' not remade because of errors.
Build completed...............Unsuccessful
Total time taken: 14 secs
//////////////////////////////////////////////////////////
I must say that doing this in the terminal with g++ -o main main.cc -I$QTDIR/include -L$QTDIR/lib -lqt works just fine. Does anyone know why it doesn't work when i try to build it in Anjuta???
/////////////////////////////////////////////////////////
#include <qapplication.h>
#include <qpushbutton.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
a.setMainWidget( &hello );
hello.show();
return a.exec();
}
///////////////////////////////////////////////////////////
i also edit the Settings and add $QTDIR/include for Include Paths,$QTDIR/lib for Library Paths, and qt for Libraries.
Anjuta compiles without any errors but once i try to build it i get this:
//////////////////////////////////////////////////////////
Building source directory of the Project: cube ...
make --keep-going
cd .. && \
/bin/sh /home/Arlen/Projects/cube/missing --run automake-1.6 --gnu src/Makefile
cd .. && /bin/sh ./config.status src/Makefile depfiles
config.status: creating src/Makefile
config.status: executing depfiles commands
/bin/sh ../libtool --mode=link g++ -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wtraditional -Wpointer-arith -Wmissing-prototypes -O1 -g -o cube -LTDIR/lib main.o -lqt
../libtool: line 1: cd: TDIR/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `TDIR/lib'
make: *** [cube] Error 1
make: Target `all' not remade because of errors.
Build completed...............Unsuccessful
Total time taken: 14 secs
//////////////////////////////////////////////////////////
I must say that doing this in the terminal with g++ -o main main.cc -I$QTDIR/include -L$QTDIR/lib -lqt works just fine. Does anyone know why it doesn't work when i try to build it in Anjuta???