useage of gcc

-Idir

  在你是用#include"file"的时候,gcc/g++会先在当前目录查找你所制定的头

  文件,如果没有找到,他回到缺省的头文件目录找,如果使用-I制定了目录,他

  回先在你所制定的目录查找,然后再按常规的顺序去找.

 -Ldir

  制定编译的时候,搜索库的路径。比如你自己的库,可以用它制定目录,不然

  编译器将只在标准库的目录找。这个dir就是目录的名称。

-llibrary

  制定编译的时候使用的库

  例子用法

  gcc -lcurses hello.c

  使用ncurses库编译程序

 

 -ggdb

  此选项将尽可能的生成gdb的可以使用的调试信息.

-static

  此选项将禁止使用动态库,所以,编译出来的东西,一般都很大,也不需要什么

  动态连接库,就可以运行.

-share

  此选项将尽量使用动态库,所以生成文件比较小,但是需要系统由动态库.

-c: output .o file

-o: output a fille

 

 

==9114== HEAP SUMMARY: ==9114== in use at exit: 14,336,980 bytes in 90,048 blocks ==9114== total heap usage: 428,295 allocs, 338,247 frees, 58,358,339 bytes allocated ==9114== ==9114== 0 bytes in 1 blocks are still reachable in loss record 1 of 25,502 ==9114== at 0x4C3289F: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==9114== by 0x66F9EBA: QV4::CompiledData::CompilationUnit::linkToEngine(QV4::ExecutionEngine*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x6904054: QQmlObjectCreator::init(QQmlContextData*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x6904202: QQmlObjectCreator::QQmlObjectCreator(QQmlContextData*, QQmlRefPointer<QV4::CompiledData::CompilationUnit> const&, QQmlContextData*, QQmlIncubatorPrivate*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x688E2E1: QQmlComponentPrivate::beginCreate(QQmlContextData*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x688BE48: QQmlComponent::create(QQmlContext*) (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5Qml.so.5.12.9) ==9114== by 0x4E49D6E: QQuickWidget::continueExecute() (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5QuickWidgets.so.5.12.9) ==9114== by 0x4E4A18A: QQuickWidgetPrivate::execute() (in /opt/Qt5.12.9/5.12.9/gcc_64/lib/libQt5QuickWidgets.so.5.12.9) ==9114== by 0x1397D2: TWDZVirtualKeyboard::TWDZVirtualKeyboard() (twdzvirtualkeyboard.cpp:24) ==9114== by 0x13965E: TWDZVirtualKeyboard::GetInstance() (twdzvirtualkeyboard.cpp:8) ==9114== by 0x136629: UartTest::UartTest(int, int, QWidget*) (uarttest.cpp:18) ==9114== by 0x136157: communicationModule::initUi() (communicationmodule.cpp:11)
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值