compilation

Configure GCC to add compile flags globally

风流意气都作罢 提交于 2019-12-12 06:04:05
问题 Can I configure GCC to add some file globally, for every project? I want to make it temporarily and only with flags like: -fdiagnostics-color . 回答1: I don't understand why do you need it but you can do a wrapper: which gcc - will print a patch to GCC (copy it to clipboard) mkdir somedir; cd somedir create file with name gcc and add into it: full path to gcc(from clipboard) -fdiagnostics-color somefile.c $@ this command will add -fdiagnostics-color somefile.c before every line that came to gcc

Error while running MPI cluster program in LAN

纵然是瞬间 提交于 2019-12-12 05:58:33
问题 Getting error while running MPI cluster program in a LAN environment. I have created a master and other clients in a local LAN environment. I follow this tutorial to create a cluster and runs it, Running an MPI Cluster with in LAN mpiuser@507-12 :~/cloud/mpich-3.0.4/examples$ mpirun -np 4 -hosts 192.168.100.77, 192.168.100.78 ./icpi mpirun: Error: unknown option "-o" Type 'mpirun --help' for usage. It's saying that we should use proper tags while writing the command and then it will work. But

C Beginner: Can't use delay() in a simple C program

醉酒当歌 提交于 2019-12-12 05:50:06
问题 test1.c #include <stdio.h> int main(void) { printf("test\n"); delay(1000); printf("test2\n"); } When I try to compile... gcc test1.c -o test1 Undefined symbols for architecture x86_64: "_delay", referenced from: _main in ccUnw3tY.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status Certainly there is a lesson here in knowing your libraries and what linking is etc... What am I missing? I am trying to do this on OSX. 回答1: There's no delay function in C, you have

Cannot compile Cairo C code on Windows 10

自闭症网瘾萝莉.ら 提交于 2019-12-12 05:25:27
问题 I am trying to compile the zetcode lines on Windows 10 using msys64. I use the following compilation command: gcc example.c -o example `pkg-config --cflags --libs cairo gtk+-3.0` and get the following error: -bash: pkg-config: command not found example.c:1:19: fatal error: cairo.h: No such file or directory #include <cairo.h> However I did pacman -S mingw-w64-i686-cairo before and the installation was successful. When I type **pacman -Ss mingw-w64-i686-cairo ** I get the following: mingw32

Basics on java makefile

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 05:14:00
问题 I am new to java and makefile, and I'd like some introductory information about a makefile. The information that's typically found online are mostly examples and high level. Here's some specific/naive questions I have about makefile: What type of files are targets of a makefile? .class and .java? What does a makefile do to those project files? I did my projects in Eclipse, so the .class files are stored in bin, and .java files are stored in scr. What kind of connection does makefile make

Migration of Perl Code to Windows: Missing Udunits Package?

半腔热情 提交于 2019-12-12 04:56:16
问题 We have some very old Perl scripts doing some database work; the scripts run in a Linux environment, which is going obsolete. One Perl script with .pl loads a package (with .pm extension); the .pm file has code like: use UDUNITS; My development environment is a Windows machine with ActivePerl 5.2 installed. I think I am able to load other Packages fine except I can't find the UDUNITS package in a Windows binary. There IS a way to compile UDUNITS2 package, per http://fossies.org/linux/udunits

Compiling vim with ruby

﹥>﹥吖頭↗ 提交于 2019-12-12 04:49:51
问题 I trying to compile vim on my Mac Osx 10.7.3 i got this Error ./configure --enable-rubyinterp make ld: library not found for -lruby.1.9.1 collect2: ld returned 1 exit status make[1]: *** [vim] Error 1 make: *** [first] Error 2 Did anyone know how i can install this lib? 回答1: Don't. MacVim has ruby support (and more) built in and comes with both the GUI, a CLI wrapper and a CLI executable. My version (snapshot 61) is 8 months old or so and it has worked without any problem through 3 ruby

GWT Hello World ; java.lang.IllegalArgumentException: No enum constant com.google.gwt.dev.cfg.ModuleDef.ModuleType.LİBRARY

一世执手 提交于 2019-12-12 04:37:10
问题 I only want to compile my HelloWorld GWT example; but in my first example i take this issue Windows 32 Ultimate- Turkish, Eclipse Mars, 回答1: According to this answer, your Turkish OS might be the problem. Add -Duser.language=en to your run configuration. 来源: https://stackoverflow.com/questions/26086901/gwt-hello-world-java-lang-illegalargumentexception-no-enum-constant-com-googl

Compile as C source file as C++ using MSVC

时间秒杀一切 提交于 2019-12-12 04:36:34
问题 I'm working on C++ project. Because of some errors I got recommendation to set Properties > C/C++ > Advanced > Compile As and check Compile as C++ Code(/TP) . My project includes iniparser.c that has extension "C". What I want to know is whether my new settings (C++) can affect the compilation of my project, given that it contains a .c file (iniparser.c)? 回答1: Your question seems to be a possible duplicate of this one: What issues can I expect compiling C code with a C++ compiler? Without

How can I add git version info into cython-built .so file?

让人想犯罪 __ 提交于 2019-12-12 04:36:20
问题 I want to add my git commit info (branch info and sha1 info) into my cython compiled out .so file. For example, I have a .pyx file, and I compile it to a .so module. but question comes, when I need to debug it, I can not find which commit exactly it comes. What do I need to do to support some action like ./demo.so --gitinfo to get something like this Branch: master, Commit: ******* ? I have search some webpage talking about c/c++ executable file with git commit info by using cmake. Here are