using a Makefile in Xcode - or alternative IDE
I am new to Xcode, Makefiles, and to programming generally.I have been given an existing C++ code to work with that is built using a Makefile. Using the Makefile I can build and run the executable on...
View ArticleUnable to execute 'gcc-8': No such file or directory error: command 'gcc-8'...
I am trying to install a package called PySIT to be run with Python, and have followed the instructions on this install page (https://pysit.readthedocs.io/en/latest/install.html) using pip on my...
View ArticleOSDEV : VGA terminal printing does not work properly
I am trying to learn how to develope an operating system but i run into a strange problem.Once i write the simplest Hello World Kernel like the following, every thing goes well and after booting my OS...
View ArticleHow to create static binary which runs on every distro?
Some linux apps like supertuxkart or regnum online have static binaries, which after downloading just work without needing to install any shared library. On every distro. How can I make such an app?
View Articlegcc: asm syntax 'mov eax, OFFSET FLAT: .LC0'?
So I saw some code.LC0: .string "Hello world"main: sub rsp, 8 mov edi, OFFSET FLAT:.LC0 call puts xor eax, eax add rsp, 8 retFrom what I've gathered, OFFSET FLAT is used when the memory model is flat....
View ArticlePreventing GCC from merging variables in braced groups
Edit:Apparently accessing variables inside braced groups after they end is undefined behaviour. Since I don't want to use dynamic allocation for nodes (as suggested by @dbush, @ikegami) I assume the...
View ArticleFix: /usr/bin/ld: cannot find -ly collect2: error: ld returned 1 exit status
I can't compile yacc i lex:$ cc gramatyka.c gramatyka.h semantyka.c -ly -ll output error: /usr/bin/ld: cannot find -ly collect2: error: ld returned 1 exit statusHow to fix it?
View ArticleCMake and custom sdk (yocto+arm) for building target applications
I have received an SDK that is used to build c++/c applications for an embedded linux device. This is all new to me so some of my terminology may be wrong. I followed their instructions and the SDK...
View Articlecompiler version not change in scons on OpenBSD 6.6
i want compile mongodb from source in OpenBSD 6.6according this link we must be changed compiler version in scons parameters but this parameters has not effect.after install any requirements...
View ArticleOn mac, g++ (clang) fails to search /usr/local/include and /usr/local/lib by...
I'm on a mac and I used homebrew to install gmp.Kyumins-iMac:gcjlib math4tots$ g++ main.cpp -lgmp -lgmpxxIn file included from main.cpp:2:./gcjlib.hpp:4:10: fatal error: 'gmpxx.h' file not...
View ArticleRoutine with Do While and For make a unknow error GCC Core dump (Segment fault)
After compiling this program with GCC (Linux or Windows or online test compiler), it fails in different ways each time it runs. I don't understand where I made the mistake.On Ubuntu Linux, the program...
View ArticleStack overflow when adding link dependency. Available stack reduced with...
ProblemI get a stack overflow if I link against a library, and I don't get it if I don't. Here is the code:#include <pthread.h>#include <stdio.h>#include <unistd.h>#include...
View Articlehow to check std::is_base_of on (*this)
For certain task, I didn't manage to get away without macro. Now I'd like to add at least some protection from misuse. I'd like to static_assert that MYMACRO() is used in a subclass of Base...
View ArticleCMake: use a custom linker
I want to setup a custom toolchain with cmake. I've set the compiler but I don't know how to set the linker. This error is reported because cmake try to use the compiler to link:The C compiler...
View Articlelinking error. Perhaps a problem with ordering?
I'm building a program which uses GTK+3 and pango. Most of it compiles fine apart from the last bit which builds the executable. The final command is:gcc -o z80sim main.c -Wall -Iz80 -Igui obj/disas.o...
View ArticleHow to configure Visual Studio Code on UBUNTU to compile gstreamer files
I have gstreamer and VSC installed on UBUNTU 18.04, and I can compile and run gstreamer tutorials from system command prompt by using instructions here:...
View ArticleHow do I install gcc on cygwin?
$ uname -r2.9.0(0.318/5/3)I don't have the gcc or the g++ command on my path after I install cygwin. What packages do I need to install to get this command?
View ArticleBuilding backward compatible binaries with newer CPU instructions support
What is the best way to implement multiple versions of the same function that uses a specific CPU instructions if available (tested at run time), or falls back to a slower implementation if not?For...
View ArticleCompiling c++ OpenACC parallel CPU code using GCC (G++)
When trying to compile OpenACC code with GCC-9.3.0 (g++) configured with --enable-languages=c,c++,lto --disable-multilib the following code does not use multiple cores, whereas if the same code is...
View Articleerror: /tmp/SASM/macro.o: No such file or directory
I have been working on SASM ide using NASM. While building, this error keeps in reoccurringBuild started... Warning! Errors have occurred in the build: gcc: error: /tmp/SASM/macro.o: No such file or...
View Article