How to fix 'error trying to exec 'cc1obj': execvp: No such file or directory
6,141
You need to install the corresponding Objective-C++ cross compiler package, either from your favorite GUI package manager or via the command line using
sudo apt install gobjc++-mingw-w64
This should install both gobjc++-mingw-w64-i686
and gobjc++-mingw-w64-x86-64
allowing you to build Objective-C++ code targeting both 32-bit and 64-bit Windows platforms.
Related videos on Youtube
Author by
Dirk Swaapt
Updated on September 18, 2022Comments
-
Dirk Swaapt about 1 year
I am running Ubuntu in a virtual machine and I keep getting this error when I try to execute
i686-w64-mingw32-gcc -o test.dll hello.m -objc
in order to cross-compile an objective c project for windows. I get the following error:i686-w64-mingw32-gcc: error trying to exec 'cc1obj': execvp: No such file or directory
-
steeldriver over 6 yearsWhat version of Ubuntu is it, and how / from where did you install the cross-compiler toolchain? it looks like maybe a required Objective-C++ compiler component is missing?
-
Dirk Swaapt over 6 yearsI'm running Ubuntu 16.04.2 LTS and I first installed gcc and after that I installed the cross-compiler toolchain mingw-w64. I also installed gobjc and gobjc++ package.
-
steeldriver over 6 yearsDid you install
gobjc++-mingw-w64
? if not, try doing so -
Dirk Swaapt over 6 yearsIt solved the error! Thanks :) Unfortunately there is now another error "fatal error: Foundation/Foundation.h: No such file or directory ", which refers to the standard foundation-header I import in my m file.
-
steeldriver over 6 yearsI'd guess you'd need a full GNUStep toolchain to get that?
-