gnu

Where are info document files in Mac or in Linux, and how can I install some missing info files?

半世苍凉 提交于 2019-12-06 09:24:08
I wanted read coreutils info, but I could not find it. Now, I wonder where the info documents in my computer (mac or linux). I want to know how I can install info files. Thank you, SangChul I suppose you entered info coreutils on the command line, which returned the info top directory instead of the coreutils info page? In that case, here is what I would do (on ubuntu 15.10, and probably on any GNU/Linux OS). Download the coreutils info document from the gnu project: wget http://www.gnu.org/software/coreutils/manual/coreutils.info.tar.gz Extract the (compressed) tar archive that you downloaded

How does gawk -e 'BEGIN {' -e 'print “hello” }' work?

半世苍凉 提交于 2019-12-06 09:08:00
问题 Gawk 5.0.0 was released on April 12, 2019. Going through the announcement I found this: Changes from 4.2.1 to 5.0.0 (...) 11. Namespaces have been implemented! See the manual. One consequence of this is that files included with -i , read with -f , and command line program segments must all be self-contained syntactic units. E.g., you can no longer do something like this: gawk -e 'BEGIN {' -e 'print "hello" }' I was curious about this behaviour that is no longer supported, but unfortunately my

Error during making “xz-5.2.1” with MinGW/MSYS

烈酒焚心 提交于 2019-12-06 07:53:25
I am trying to compile " xz-5.2.1 " in MinGW/MSYS environment. I see the following errors: #error UINT32_C is not defined and unsigned int is not 32-bit. error: #error size_t is not 32-bit or 64-bit I am not familiar with MinGW, could anyone shed some light on this? It looks like some macro definition are missing. Some header file missing? ADD 1 The commands I used to compile the xz-5.2.1 are: ./configure ./make The error screenshot: Some background, I am following this link to compile the Tesseract-OCR library. And this is just one of the steps. ADD 2 Based on the error message, I checked the

C/C++, FORTRAN, underscores, and GNU Autotools

浪尽此生 提交于 2019-12-06 07:48:11
问题 I have a question about mixed-language programming (C/C++ and FORTRAN) using gcc and gfortran. I've searched plenty of "mixing fortran with language X" and haven't been able to resolve this. I'm not sure if this is a linking problem or a compiler problem, or both. I've created three files and I'm using GNU Autotools to build the crude application, but should be able to build the app from command line independently. The C File (main.c) will be the driving app, that calls several FORTRAN

C++ 环境设置

北战南征 提交于 2019-12-06 07:47:34
本地环境设置 如果您想要设置 C++ 语言环境,您需要确保电脑上有以下两款可用的软件,文本编辑器和 C++ 编译器。 文本编辑器 这将用于输入您的程序。文本编辑器包括 Windows Notepad、OS Edit command、Brief、Epsilon、EMACS 和 vim/vi。 文本编辑器的名称和版本在不同的操作系统上可能会有所不同。例如,Notepad 通常用于 Windows 操作系统上,vim/vi 可用于 Windows 和 Linux/UNIX 操作系统上。 通过编辑器创建的文件通常称为源文件,源文件包含程序源代码。C++ 程序的源文件通常使用扩展名 .cpp、.cp 或 .c。 在开始编程之前,请确保您有一个文本编辑器,且有足够的经验来编写一个计算机程序,然后把它保存在一个文件中,编译并执行它。 C++ 编译器 写在源文件中的源代码是人类可读的源。它需要"编译",转为机器语言,这样 CPU 可以按给定指令执行程序。 C++ 编译器用于把源代码编译成最终的可执行程序。 大多数的 C++ 编译器并不在乎源文件的扩展名,但是如果您未指定扩展名,则默认使用 .cpp。 最常用的免费可用的编译器是 GNU 的 C/C++ 编译器,如果您使用的是 HP 或 Solaris,则可以使用各自操作系统上的编译器。 以下部分将指导您如何在不同的操作系统上安装 GNU 的 C/C

compiling c++ code using gnu/c getline() on mac osx?

怎甘沉沦 提交于 2019-12-06 07:21:14
I'm trying to compile a pre-existing c++ package on my mac osx leopard machine, and get the following error: error: no matching function for call to 'getline(char**, size_t*, FILE*&)' This is probably because getline() is a GNU specific extension. Can I somehow make the osx default g++ compiler recognize such GNU specific extensions? (if not, I could always supply my own implementation or GNUs original one, but I prefer to have a "cleaner" solution if possible) getline is defined in stdio.h in glibc version 2.10 and later, but not in earlier versions, nor (so far; added 10.5 definitely didn't

Compiling ARM .s file on Mac

强颜欢笑 提交于 2019-12-06 06:35:02
问题 I am on Mac Os X and I am having trouble compiling a .s ARM assembly file. my .s file is this: mov r0, r1 just to see if it works. but when i do arm-elf-as my.s i get an a.out file. i do chmod +x a.out and ./a.out but it says cannot execute binary file this has me confused, because it should be able to execute if i compiled it with arm-elf-as. How do i go about compiling this .s? 回答1: You're assembling it allright, you just can't run it on a Mac since Macs don't have ARM CPUs. If you install

How to decide the base address for the location counter “.” when VMA and LMA are different?

三世轮回 提交于 2019-12-06 06:21:32
According to the ld manual on the special symbol . , i.e.the Location Counter . Note: . actually refers to the byte offset from the start of the current containing object. Normally this is the SECTIONS statement, whose start address is 0, hence . can be used as an absolute address. If . is used inside a section description however, it refers to the byte offset from the start of that section, not an absolute address. Thus in a script like this: SECTIONS { . = 0x100 .text: { *(.text) . = 0x200 } . = 0x500 .data: { *(.data) . += 0x600 } } The '.text' section will be assigned a starting address of

Is the GNU C Library usable on non-GNU (or POSIX) platforms?

谁说胖子不能爱 提交于 2019-12-06 06:09:46
问题 Just wondering, is the GNU C Library (glibc) usable on non-GNU and/or non-POSIX platforms such as Microsoft Windows? 回答1: Yes, its possible in theory, but not really worth it in practice. You would need to port the syscall interface, dynamic linker, and other parts to Windows or your platform of choice, and Glibc is not an ideal candidate for this. If you really need a self contained C library, I would consider newlib or uClibc (or FreeBSD's/OpenBSD's libc) over glibc. Glibc is a complex

How in OS/X to get 'seq' command-line functionality?

老子叫甜甜 提交于 2019-12-06 02:42:49
I'm still on Snow Leopard (I know...) so forgive if this is fixed in one of the later versions of OS/X, but I want to do standard "seq" aka: for i in `seq 1 100` ; do cat /whatever > $i.txt ; done I thought installing GNU tools would do it, but apparently not. On my mac both of these work (OS X 10.8.5) Andreas-Wederbrands-MacBook-Pro:~ raven$ for i in {1..10}; do echo $i; done 1 2 3 4 5 6 7 8 9 10 Andreas-Wederbrands-MacBook-Pro:~ raven$ for i in `seq 1 10`; do echo $i; done 1 2 3 4 5 6 7 8 9 10 In Snow Leopard, you can use the jot command, which can produce sequential data like seq (and more,