Problems in arm-linux

Source: Internet
Author: User
Problems encountered in arm-linux-general Linux technology-Linux programming and kernel information. The following is a detailed description. I. A problem encountered when installing the cross tool chain

Operating System: redhat9.0 use crosstool to build a cross tool chain. When executing the script, enter the following command:

# Cd crosstool-0.42

#./Arm. sh

The following error message is displayed:

Set both LINUX_DIR and LINUX_SANITIZED_HEADER_DIR-ignoring LINUX_DIR for the build
Dejarnu not set, so not running any regression tests
GCC_EXTRA_CONFIG not set, so not passing any extra options to gcc's configure script
GLIBC_ADDON_OPTIONS not set, so building all glibc add-on's
+ TOOLCOMBO = gcc-3.3.6-glibc-2.3.2
++ Pwd
+ BUILD_DIR =/home/mike/crosstool-0.42/build/arm-linux-/gcc-3.3.6-glibc-2.3.2
++ Pwd
+ TOP_DIR =/home/mike/crosstool-0.42
+ Test-z''
+ SRC_DIR =/home/mike/crosstool-0.42/build/arm-linux-/gcc-3.3.6-glibc-2.3.2
+ Echo 'src _ DIR not set, so source tarbils will be unpacked in the build directory'
SRC_DIR not set, so source tarbils will be unpacked in the build directory
+ Abort 'don' \'t run all. sh or crosstool. sh as root, it '\'s dangerous'
+ Echo 'don' \ 't'run all. sh or crosstool. sh as root, 'it' \'s 'dangerous
Don't run all. sh or crosstool. sh as root, it's dangerous

Problem solved: The above prompt indicates that the operation is risky under the root user permission, so I gave the user more, but also indicated that the permission is insufficient. Finally, I restarted the system, log on as a common user (originally logged on as root). Run the su command to change the common user to root. Then, the above operations are successfully performed.

Ii. problems encountered when learning helloworld in qt

# Include
# Include
Int main (int argc, char ** argv)
{
QApplication a (argc, argv );
QPushButton hellobtn ("Hello world! ", 0 );
Hellobtn. resize (100, 20 );
A. setMainWidget (& hellobtn );
Hellobtn. show ();
Return a.exe c ();
}

This is the code.

This is a problem when I run the hello program.

[Root @ fkw root] # cd/root/qt
[Root @ fkw qt] # qmake
[Root @ fkw qt] # make
G ++-c-pipe-Wall-W-O2-g-pipe-march = i386-mcpu = i686-fno-use-cxa-atexit-fno-tions-DQT_NO_DEBUG- i/usr/lib/qt-3.1/mkspecs/default-I. -I/usr/lib/qt-3.1/include-I. ui/-I. moc/-o. obj/hello. o hello. cpp
Hello. cpp: 1: 24: QApplication: No file or directory
Hello. cpp: 2: 23: QPushButton: No file or directory
Hello. cpp: In function 'int main (int, char **)':
Hello. cpp: 5: error: 'qapplication' undeclared (first use this function)
Hello. cpp: 5: error: (Each undeclared identifier is reported only once for each
Function it appears in .)
Hello. cpp: 5: error: syntax error before '('token
Hello. cpp: 6: error: 'qpushbutton 'undeclared (first use this function)
Hello. cpp: 7: error: 'hello' undeclared (first use this function)
Hello. cpp: 9: error: 'app' undeclared (first use this function)
Hello. cpp: 4: warning: unused parameter 'int argc'
Hello. cpp: 4: warning: unused parameter 'Char ** argv'

Work und: If qt is correctly installed, this problem is caused by no environment variable being modified, as long as you add/usr/local/Trolltech/Qt-4.2.2/bin to the PATH variable as follows:

Open. bash_profile with vi

Add the following to the last line of the file:

PATH =/usr/local/Trolltech/Qt-4.2.2/bin: $ PATH

Export PATH

Save and exit. This problem will not occur after compilation.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.