17,495 questions
Advice
0
votes
1
replies
50
views
Does the way a program is written/formatted affect how fast and large it is at compile time?
We all know that there's no wrong way to write code, and infinite possible ways to complete a task. Everyone codes differently.
There are of course many ways to shorthand code, so the same code can be ...
0
votes
0
answers
106
views
Need help compiling a JavaFx project [duplicate]
Created a JavaFX app using Java 21 and copied this tutorial to build my project
https://www.youtube.com/watch?v=udigo_qSp_k
I then created my project, and everything ran fine in an IDE. When trying to ...
0
votes
1
answer
29
views
Custom LLVM backend: error: unable to interface with target machine
Background
I am writing a custom, globalISel only, backend for a currently unsupported processor. I have progressed to the point where I can run
> clang -target xxx -emit-llvm file.c
> llc -...
2
votes
1
answer
90
views
Does `jax` compilation save runtime memory by recognizing array elements that are duplicated by indexing
Consider the example code:
from functools import partial
from jax import jit
import jax.numpy as jnp
@partial(jit, static_argnums=(0,))
def my_function(n):
idx = jnp.tile(jnp.arange(n, dtype=int)...
0
votes
0
answers
78
views
build kernel-6.6 for riscv met "undefined reference to __efistub_efi_zboot_entry" issue
I was building kernel6.6(source from openkylin2.0 a down stream distibution of debian) on riscv platform, I met an issue while build with command dpkg-buildpackage -us -uc, part of the build log is as ...
1
vote
0
answers
42
views
How can I remove the GCC version strings from executable binaries
on .elf formats, there is a .comment section that includes compiler & linker names and versions, this is fine since its discardable via editing the linker scripts
However on Windows .exe's, while ...
2
votes
0
answers
137
views
TypeScript compilation fails with "JSX element implicitly has type 'any'" and "Cannot find module 'react'" errors in React project
My React with TypeScript project was building successfully but now I'm getting TypeScript compilation errors when running npm run build:
JSX errors:
JSX element implicitly has type 'any' because no ...
0
votes
0
answers
62
views
kotlinc cant compile file with more 1 path to .jar in -cp or -classpath flag
Problem description: When using the Kotlin compiler (kotlinc) of any version from the command line (not IntelliJ IDEA, but a separate folder with a .bat file), and when specifying multiple libraries (....
1
vote
1
answer
85
views
`getattr`, `setattr` and `delattr` restricted to byte-compiled code
I was going through classes doc. And I found the following paragraph.
Notice that code passed to exec() or eval() does not consider the classname of the invoking class to be the current class; this ...
1
vote
0
answers
134
views
Implements generic WinRT interfaces use <AllowUnsafeBlocks>True</AllowUnsafeBlocks>. But where exactly do I place that setting?
I have a MAUI project that's giving multiple errors related to my custom classes \Models\Term.cs and \Models\Course.cs. Visual Studio 2022 gives the same recommendation for both:
Type 'System....
0
votes
1
answer
128
views
JAR file can not access to a given directory
I made a Java application that loads image files from a directory called "images".
If I compile and build in this way it works:
javac Swing.java
java Swing
Conversely, if I compile and ...
0
votes
0
answers
83
views
Nuitka onefile can't find directory for dynamic extension loading
I'm working on a Pycord bot project, and I'm using Nuitka to compile it. My goal is to compile the main script as a single file (--onefile) for distribution, but still be able to dynamically load ...
0
votes
1
answer
56
views
PCTCompile and strict compile options
Im trying to make PCTCompile fail compilation with the following settings:
requireFullNames="true"
requireFieldQualifiers="true"
requireReturnValues="true"
However, ...
3
votes
1
answer
362
views
is it possible for Angular cli to use the new typescript compiler which is written in GO
I'm working on a big Angular project. The compilation time is quite long.
I've heard that Microsoft released a new typescript compiler, which is written in GO and is 10x faster than the previous ...
1
vote
1
answer
82
views
Is compiler in debug mode forced to reload all registers at every line? [duplicate]
I have been studying how debuggers work and studying assembly output of compilers in debug mode. One thing I noticed is that they seem to reload registers at every single line, even if no code could ...
0
votes
1
answer
22
views
Is there a way to compile js and scss files without node_modules folder
I accidentally deleted the node_modules folder. I can't reinstall it since the files containing the npm libraries called package.json has been deleted as well. Is there some other way of manually ...
0
votes
0
answers
50
views
shift-reduce conflict in grammar with yacc/bison
I am writing a c-like language, but for grammar shown below:
module: module declORFunc
| declORFunc
;
declORFunc: decl
| func
decl: CONST_opt btype varDef_list SEMICOLON ;
CONST_opt: /* ...
0
votes
0
answers
45
views
macOS: possible to compile standalone (static-linked) pdf2svg?
Under macOS, s it possible to compile/package pdf2svg so that it doesn't require separate libaries (Cairo, Poppler, etc.)? I distribute a freeware ApppleScript applet that uses Ghostscript to convert ...
1
vote
1
answer
52
views
How to exclude a function from Gprof activity during running
Suppose i have function foo
void foo()
{
//do something
}
Now this fn foo is now called by other function defined in other files. if gprof is enabled it would do profiling activity and subroutines ...
1
vote
1
answer
72
views
How to convert an Xcode project that uses automatic build to a command-line project using make?
I've been working on my game engine, which is for mac on Xcode.
However, I'm a little bit tired of the complex configuration in Xcode. Terminal based projects do not have this problem. I can simply ...
0
votes
0
answers
155
views
cross compiling cpp code for windows using mingw32 generates error with libstdc++-6.dll
I'm developing in C++ on Windows 11 using WSL with an Ubuntu 24.04.2 LTS distribution. For my course projects, I use the SDL2 library. Due to insufficient performance with graphical interfaces under ...
0
votes
0
answers
24
views
Link a precompiled binary in linux to make it static [duplicate]
If I have a ELF binary that has dynamic dependencies, are there any tools to perform ahead-of-time linking to create a static binary with no dependencies?
e.g.
$ ldd $(which tcpdump)
/lib/ld-...
1
vote
0
answers
222
views
compiling whisper.cpp on linux aarch64 machine
i was trying to complie whisper.cpp on a aarch64 machine, after runinng "cmake -B build",i got the following info, how to fix these errors?
Looking for pthread.h
Looking for pthread.h - ...
6
votes
1
answer
244
views
Why are you allowed to assign a field to itself?
I've been coding in Java since 2005 and never thought that the code like that would actually be compilable:
public class FooClass {
public static final String FOO = FooClass.FOO;
}
Intellij ...
1
vote
1
answer
49
views
Using foreach in Makefile to compile subdirectories separately
I have the following Makefile sample:
BUILD = build
PATH_POT3 = src/pot/pot3/
MPIFC = mpiifort
FFLAGS = -O3
MOL_LIST = $(shell find $(PATH_POT3) -mindepth 1 -maxdepth 1 -type d)
$(foreach MOL,$(...