Compile Objective-C with GNUstep - objective-c

I'm a newbie in Objective-C. I'm trying to compile Objective-C with GNUstep but it's giving errors. I tried to both compile on command line (gcc and makefile).
No such file or directory /
excepted '>' before 'GSPredicateBlock'
…
I used the command line
gcc gnustep-config --objc-flags -o hello hello.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString -enable-auto-import
My attempt at using a makefile:
Making all for tool Hello...
Compiling file hello.m ...
hello.m:1:71 fatal error: ../../GNUstep/System/Library/Headers/Foundation/Found ation.h: No such file or directory
compilation terminated.
make[3]: *** [obj/Hello.obj/hello.m.o] Error 1
make[2]: *** [internal-tool-all_] Error 2
make[1]: *** [Hello.all.tool.variables] Error 2
make: *** [internal-all] Error 2
I've searched Google, but I can't find anything that helps. I installed gnustep-msys-system-0.28.0-setup, gnustep-core-0.28.0-setup and gnustep-devel-1.3.0-setup on Windows 7.

I don't know if this is a red herring but I see there's a space in a place where it should not be:
Foundation/Found ation.h
it should read:
#import <Foundation/Foundation.h>
(without the space) in your source code file
Obviously this is what the compiler complains about here:
hello.m:1:71 fatal error: ../../GNUstep/System/Library/Headers/Foundation/Found ation.h: No such file or directory
remove that space in your source code file's import directive and try again.

Related

Why is my MakeFile path setup getting a "No such file or directory" error?

I am trying to run a makefile. I think the makefile is trying to access this path:
/home/s/miniconda3/lib/python3.7/site-packages/tensorflow/include/unsupported/Eigen
But when I run it, I get a No such file or directory error:
(base) s#s-VirtualBox:~/Downloads/3d-psrnet-master$ make
make: Circular utils/tf_ops/cd/tf_nndistance_g.cu <- utils/tf_ops/cd/tf_nndistance_g.cu.o dependency dropped.
/usr/local/cuda-10.1/bin/nvcc -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -c -o utils/tf_ops/cd/tf_nndistance_g.cu.o utils/tf_ops/cd/tf_nndistance_g.cu -I /home/s/miniconda3/lib/python3.7/site-packages -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -O2
utils/tf_ops/cd/tf_nndistance_g.cu:3:10: fatal error: include/unsupported/Eigen: No such file or directory
#include "include/unsupported/Eigen"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:12: utils/tf_ops/cd/tf_nndistance_g.cu.o] Error 1
I have it set like this at the top of makefile: tensorflow = /home/s/miniconda3/lib/python3.7/site-packages (which is the path that shows up if I type into Terminal pip show tensorflow)
And then in tf_nndistance_g.cu I have:
#include "include/unsupported/Eigen/"
What might be the reason that this makefile isn't working? I'm using Python 3.7 on a Virtual Machine (ubuntu Virtualbox). Thanks.

How can fix Access Noxim installation Error

Plz Help what is the error when I run the "make"
g++ -g -O3 -I. -I.. -I../src -I/usr/local/systemc-2.3.2/include/systemc-2.2 -c ../src/NoximNoC.cpp
../src/NoximNoC.cpp:14:10: fatal error: systemc.h: No such file or directory
14 | #include <systemc.h>
| ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile.defs:26: ../src/NoximNoC.o] Error 1
Welcome to StackOverflow :-)
systemc.h: No such file or directory
That's the core error here. Maybe that file is indeed not present on your system, or your make toolchain can't find it. Please try the advice in https://stackoverflow.com/a/43375326/4341322.

ld unrecognised emulation mode aarch64linux

When running make in CMake, I only get an error that says /usr/bin/ld unrecognised emulation mode aarch64linux.
Im trying to build DualBootPatcher app for Android, this is the error:
/usr/bin/ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [misc/CMakeFiles/fsck-wrapper.dir/build.make:76: misc/fsck-wrapper] Error 1
make[4]: *** [CMakeFiles/Makefile2:1786: misc/CMakeFiles/fsck-wrapper.dir/all] Error 2
make[3]: *** [Makefile:163: all] Error 2
make[2]: *** [android/CMakeFiles/android-system_arm64-v8a.dir/build.make:111: android/android-system_arm64-v8a-prefix/src/android-system_arm64-v8a-stamp/android-system_arm64-v8a-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1868: android/CMakeFiles/android-system_arm64-v8a.dir/all] Error 2
make: *** [Makefile:163: all] Error 2>
Im running latest Cmake and binutils. Also tried reinstalling binutils.
Im NOT a developers, so it would be nice if you could explain it^^
Does anyone has a solution?
The issue is clear from the fact that the output is coming from /usr/bin/ld. This is the system ld, rather than the ld included with the NDK. You should investigate why this ld is being executed instead, for example via strace.
For me it turned out to be a file permissions issue - the NDK zip file had extracted without execute permissions, so the toolchain binaries were silently ignored. A few chmod +x later and all was well.

ALIZE platform installation

Could you, please, help me with this error. I'm trying to install alize-1.4 on Ubuntu from this site http://mistral.univ-avignon.fr/download_en.html. But I get such error at the end
make[1]: Leaving directory `/home/admin-pc/alize/src'
make: *** [all-recursive] Error 1 cp: cannot stat `src/libalize.a': No
such file or directory
Maybe someone of you used ALIZE code?
Thanks
So, according to the log the real error is
g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libalize\" -DVERSION=\"0.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -O3 -ffast-math -Wall -march=pentium4 -MT SegServerFileWriter.o -MD -MP -MF .deps/SegServerFileWriter.Tpo -c -o SegServerFileWriter.o SegServerFileWriter.cpp
SegServerFileWriter.cpp: In member function void alize::SegServerFileWriter::writeSegServerTrs(const alize::SegServer&):
SegServerFileWriter.cpp:299: error: 'qsort' was not declared in this scope
make[1]: *** [SegServerFileWriter.o] Error 1
This type of error is quite common when you compile old style C++ projects with newer gcc due to the restrictions of the new compiler
The easy way would be just to checkout the latest code with subversion, it has all such issues fixed:
svn checkout http://alize.univ-avignon.fr/svn/ALIZE/trunk/
Or to add #include <cstdlib> into the file header to import the qsort declaration.

libgmp-10.dll missing error in Netbeans 7.1 for MinGW

I have installed C/C++ plugin in Netbeans 7.1 and configured MinGW.
But when I run the code, its showing libgmp-10.dll missing error. My IDE is even showing that its unable to find stdio.h, stdlib.h.[ there were some underlined marks on the code] (I have configured "C:\MinGW\bin" in system Path variable)
This is the code:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
printf("working")
return (EXIT_SUCCESS);
}
this is the output I got.
"/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/suryak/Documents/NetBeansProjects/CppApplication_1'
"/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/cppapplication_1.exe
make[2]: Entering directory `/c/Users/suryak/Documents/NetBeansProjects/CppApplication_1'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
gcc.exe -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.c
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `/c/Users/suryak/Documents/NetBeansProjects/CppApplication_1'
make[1]: Leaving directory `/c/Users/suryak/Documents/NetBeansProjects/CppApplication_1'
BUILD FAILED (exit value 2, total time: 12s)
I still don't understand why this is happening.
I tried to add "make.exe" in the CMake option but it didn't even work.
C:\MinGW\msys\1.0\bin\make.exe
There was a problem with the MinGW install file, I downloaded a new version through the netbeans site and it worked fine. LINK
Actually, I found in the log file that MinGW couldn't download a file which caused error.