compilation

This FORTRAN code shouldn't compile. Is there a reason why it does?

邮差的信 提交于 2021-02-05 05:55:26
问题 The following code compiles, but I do not think that it should. As you can see, the output is garbage. This is a minimal failing example of something that bit me hard in a large project I work on. My question is - why does the compiler not complain? Is this a compiler limitation, or is this somehow "expected behaviour", and I've missed something? I'm using gfortran 4.6.3. module dataModule integer :: datum1 = int(1) integer :: datum2 = int(2) end module dataModule program moduleTest use

Install Ruby 2.2 on Mac OSX Catalina with ruby-install

时光总嘲笑我的痴心妄想 提交于 2021-02-05 02:41:08
问题 Here's what I get when I try to install Ruby 2.2: $ ruby-install ruby 2.2.10 # ... >>> Compiling ruby 2.2.10 ... CC = clang LD = ld LDSHARED = clang -dynamic -bundle CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe

Install Ruby 2.2 on Mac OSX Catalina with ruby-install

不问归期 提交于 2021-02-05 02:40:06
问题 Here's what I get when I try to install Ruby 2.2: $ ruby-install ruby 2.2.10 # ... >>> Compiling ruby 2.2.10 ... CC = clang LD = ld LDSHARED = clang -dynamic -bundle CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -pipe

How to build as an ia32 solution from visual studio using cmake

僤鯓⒐⒋嵵緔 提交于 2021-02-04 21:28:32
问题 I have a module project using cmake with the following configuration: cmake_minimum_required(VERSION 3.13) project(app) set(CMAKE_CXX_STANDARD 11) add_library(app MODULE src/library.cpp src/library.h) Once solution generated using cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release , I can find an app.sln solution. I open it with Visual Studio 2019 and click on the button Local Windows Debugger . I can see also a drop-down menu containing the value x64 and an item

How to build as an ia32 solution from visual studio using cmake

纵饮孤独 提交于 2021-02-04 21:28:29
问题 I have a module project using cmake with the following configuration: cmake_minimum_required(VERSION 3.13) project(app) set(CMAKE_CXX_STANDARD 11) add_library(app MODULE src/library.cpp src/library.h) Once solution generated using cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release , I can find an app.sln solution. I open it with Visual Studio 2019 and click on the button Local Windows Debugger . I can see also a drop-down menu containing the value x64 and an item

How to build as an ia32 solution from visual studio using cmake

让人想犯罪 __ 提交于 2021-02-04 21:28:07
问题 I have a module project using cmake with the following configuration: cmake_minimum_required(VERSION 3.13) project(app) set(CMAKE_CXX_STANDARD 11) add_library(app MODULE src/library.cpp src/library.h) Once solution generated using cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release , I can find an app.sln solution. I open it with Visual Studio 2019 and click on the button Local Windows Debugger . I can see also a drop-down menu containing the value x64 and an item

Run-time linking to dynamic libraries not on LD_LIBRARY_PATH

只愿长相守 提交于 2021-02-04 16:32:40
问题 I'm trying to link a project of mine to a particular set of custom-compiled libraries placed on the project's base directory [proj_dir]/lib - not on any of the system's /lib, /usr/lib or /usr/local/lib - to avoid conficts with the installed stock versions of those same libraries. I'm able to compile the project by passing the library path with the -L flag, but I get error while loading shared libraries libXXX.so: cannot open shared object file: No such file or directory when I run the

Run-time linking to dynamic libraries not on LD_LIBRARY_PATH

萝らか妹 提交于 2021-02-04 16:32:29
问题 I'm trying to link a project of mine to a particular set of custom-compiled libraries placed on the project's base directory [proj_dir]/lib - not on any of the system's /lib, /usr/lib or /usr/local/lib - to avoid conficts with the installed stock versions of those same libraries. I'm able to compile the project by passing the library path with the -L flag, but I get error while loading shared libraries libXXX.so: cannot open shared object file: No such file or directory when I run the

How to compile doom on ubuntu?

眉间皱痕 提交于 2021-02-04 15:40:41
问题 I am trying to compile the source code for the original doom as a way to learn C. I downloaded it from github and fixed an obvious mistake in i_video.c line 49 (errnos.h -> errno.h). I now get this: m_misc.c:257:5: warning: initialization from incompatible pointer type [enabled by default] m_misc.c:257:5: warning: (near initialization for ‘defaults[14].location’) [enabled by default] m_misc.c:257:5: error: initializer element is not computable at load time m_misc.c:257:5: error: (near

Is it possible to determine which Fortran compiler generated a “.mod” file?

三世轮回 提交于 2021-02-04 13:46:06
问题 Say I have a package already installed on my machine and I want to figure out if I need to regenerate the module include files ( .mod ) to make them compatible with the rest of my compilation. Is there any way to do this? 回答1: If the module is built using gfortran then using strings on the mod file (on Linux) will provide the compiler name and the version number. However, for Intel, the strings command will only show the compiler version number. 回答2: I had a similar problem at some point with