-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While Configuring GNUmake its unable to find libobjc #26
Comments
libobjc2 requires Clang, but doesn’t currently support MinGW (gnustep/libobjc2#190). If you’re open to using the MSVC toolchain instead of MinGW you could use this project instead: |
@triplef is there any step by step guide as to how to install libobjc and build GNUStep on windows? I have the libobjc.dll with me I just need to know how to install libobjc and how can I configure and build gnustep make and base. |
If you’re ok with not using MinGW then yes: Alternatively you can just download the pre-built binaries: |
@triplef How can I build gnustep without ARC and with native exception support using this tool chain? Is there an option that I have to give when building it? |
The toolchain supports ARC, but you can decide whether you want to build your own code with or without ARC using the |
@triplef I tried building my code using pre-built binaries via command line and I'm getting the following error. Its also not recognizing the native exception handling in objective c. Like the NS_DURING macro. why am I getting this errors and how can I resolve it. |
Sounds like you are not setting the right compiler flags. Please follow the instructions here: |
@triplef I just ran the following command for my file and it threw me this error. |
The clang you’re using is probably the one from MinGW, not the standard Windows one required for this setup. You’ll want to use a non-MinGW MSYS2 shell (the first one listed here), launched inside a Visual Studio environment (e.g. the "x64 Native Tools Command Prompt for VS") by running something like this: Running
|
@triplef This has resolved that error. Now I'm facing another error where I'm trying to generate a dll for my code. Its showing the following error. Any idea why this is happening. i couldn't any article for this error in google. |
I’m guessing there’s some other error in Test.m causing this. Can you attach the whole file? |
I was trying to create empty dll just to see whether is compiling or not
|
Maybe |
@triplef I have run the following command to create the dll.
and its throwing me the following error
|
Looks like clang trying to use the gcc you have installed inside mys2 for linking for some reason (even though |
@triplef while uninstalling gcc its saying
Even in the website its saying clang is dependent on gcc (here) And also looking at the error output |
You should usually not have any compilers installed inside the MSYS subsystem (only inside MinGW, see here for the differences). Please uninstall both clang and gcc (clang is also the wrong one as indicated by the |
@triplef So which clang should i use? |
Either the one from Visual Studio, or you can install the one from releases.llvm.org. The MSYS and MinGW ones do not produce normal Windows binaries. |
Alternatively if you don’t want to change your MSYS/MinGW environment it might be easier to use |
@triplef I tried the following command in visual studio developer powershell
and this is giving the following error
|
I’ve never tried in PowerShell, could this be causing this? Can you try in a normal Visual Studio CMD? |
@triplef Running the command on visual studio cmd worked... any idea what the command is for generating DLL in clang-cl |
|
@triplef So just linking the lib files in the following commands are enough or do i need to include any other lib files like clang or vs?
If just the above lib files are enough then when I use my test.dll for some other application do I have to also use the gnustep-base.dll , objc.dll, dispatch.dll ? |
Yes your exe will need to be able to load the GNUstep DLLs. |
I’m going to mark this as resolved, but please feel free to open issues against the tools-windows-msvc repo if applicable, or otherwise the discuss-gnustep mailing list is also a good place to get help. |
I'm trying to build a gnustep DLL on windows. I have first built objc.dll file following the instructions mention in GNU-Wiki using the libobjc2 source code and I started configuring the gnumake. while configuring its showing the following things:
The above command line output shows its couldn't find the libobjc and the compiler we are using doesn't support native objc exception. I want to configure make with libojc and with native objc exception support. Any help is much appreciated?
The text was updated successfully, but these errors were encountered: