相关疑难解决方法(0)

优胜美地和Valgrind

你能告诉我如何在优胜美地上安装valgrind吗?当我尝试安装它时,我得到"检查内核版本...不支持(14.0.0)configure:错误:Valgrind适用于Darwin 10.x,11.x,12.x和13.x(Mac OS X) 10.6/7/8/9)"

没有官方路径或更新,我没有找到任何东西(除了http://comments.gmane.org/gmane.comp.kde.devel.bugs/1553705,但他们没有解决这个问题).

macos valgrind osx-yosemite

111
推荐指数
6
解决办法
4万
查看次数

Valgrind报告了一个非常简单的C程序的错误

我正在从Learn C The Hard Way学习C语言.我正在练习6,虽然我可以使它工作,但valgrind会报告很多错误.

这是从文件中删除的最小程序ex6.c:

#include <stdio.h>

int main(int argc, char *argv[])
{
    char initial = 'A';
    float power = 2.345f;

    printf("Character is %c.\n", initial);
    printf("You have %f levels of power.\n", power);

    return 0;
}
Run Code Online (Sandbox Code Playgroud)

内容Makefile只是CFLAGS=-Wall -g.

我编译程序$ make ex6(没有编译器警告或错误).执行with $ ./ex6产生预期的输出.

当我运行程序时,$ valgrind ./ex6我得到了我无法解决的错误.这是完整的输出:

==69691== Memcheck, a memory error detector
==69691== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==69691== …
Run Code Online (Sandbox Code Playgroud)

c valgrind

11
推荐指数
2
解决办法
5821
查看次数

标签 统计

valgrind ×2

c ×1

macos ×1

osx-yosemite ×1