After updating to the latest versions of Xamarin Studio this morning the ZBar and ATMHud references in our project started throwing a bunch of errors, all of which were:
The type 'MonoTouch.UIKit.UIViewController' is defined in an assembly that is not referenced. Consider adding a reference to assembly 'monotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' (CS0012)'
I did some reading and found out that I needed to rebuild both of the libraries because of something to do with "assembly strong names" in Xamarin. I was able to muddle my way through rebuilding the ZBar library, but the ATMHud rebuild has given me some trouble and I'm not familiar enough with what I'm doing to fix the problem.
I downloaded the ATMHud project from github and followed the instructions in the readme which state "Run 'make' in the binding directory to build ATMHud.dll", but when I do that I get errors.
Teds-Mac:binding ted$ make
/Developer/MonoTouch/usr/bin/btouch -e atmhud.cs enums.cs AssemblyInfo.cs --out=ATMHud.dll --link-with=libATMHudSDK.a,libATMHudSDK.a
/var/folders/75/vl_6zkyx03sc4tymnp41lsgw0000gn/T/09x9yx7m.nz9/AtmHud/AtmHud.g.cs(751,86): error CS0103: The name class_ptr' does not exist in the current context
/var/folders/75/vl_6zkyx03sc4tymnp41lsgw0000gn/T/09x9yx7m.nz9/AtmHud/AtmSoundFX.g.cs(75,104): error CS0103: The nameclass_ptr' does not exist in the current context
Compilation failed: 2 error(s), 0 warnings
btouch: API binding contains errors.
make: * [ATMHud.dll] Error 1
I've scanned through the files in the folders but can't seem to track down any references to "class_ptr".
Can anyone help with what might be the cause of the problem I'm seeing, and can you confirm that this will get me past the original "assembly strong names" problem I'm seeing?
As a temporary measure you can fix your old assemblies with this tool: https://github.com/rolfbjarne/iOSRefUpdater
Update
I've fixed the ATMHud bindings, now they should compile with newer versions of Xamarin.iOS installed as well.
Related
I seem to be getting a peculiar problem which is hard to even search up online.
I'm using stack and have already created a project from my professor but when I try to run it with stack build or stack run
I get this error:
InvalidAbsFile "C:\\Programs\\Projects\\bimaru2\\\"C:\\Windows\\system32\\ghc-9.0.2.exe"
The error is mentioned here: https://hackage.haskell.org/package/path-0.9.2/docs/Path-Windows.html#v:InvalidAbsFile but this description is not telling me anything.
I found someone with a similar problem: InvalidAbsFile error when running "stack" on windows in an existing project. I removed Java but the problem still persists. I tried changing directories and all, so the first path is printed according to where the project is. My version of ghc was 8.10.7 and I reinstalled 9.2.4, so I have no idea where 9.0.2 comes from (nor do I have it in C:\Windows\system32\ directory).
This is the second project I get this error with, but the first one I solved by setting system-ghc in stack.yaml file from true to false (although the professor mentioned that then it did not compile for him until he changed it back when we turned in the assignment).
packages:
- .
resolver: lts-18.28
compiler: ghc-8.10.7
compiler-check: match-exact
system-ghc: false
install-ghc: false
I tried the same with this one, but it did not work.
If needed, I will provide a link to the github repo where the project is located.
I'd be really grateful if you could help me get the project running. Thanks in advance!
I've been trying to build my Haskell project for the last couple days using stack and I'm getting an access violation error. From what I understand I have the latest stack version and GHC.
This was all originally working until I added a library to my cabal file. I've now removed it but the error still occurs. I've also reverted back to when my code was definitely working so I'm sure this is something caused by stack.
I've tried uninstalling stack, deleting .stack-work and reinstalling. Then doing a stack setup. I've tried many variations of commands but no results.
I've now also tried creating a new project with Stack and building it and I get the same issue.
stack build
Building all executables for `haskell-project' once. After a successful build of all of them, only specified executables will be rebuilt.
haskell-project-0.1.0.0: configure (exe)
Access violation in generated code when reading 000000000e58391a
-- While building custom Setup.hs for package haskell-project-0.1.0.0 using:
C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.0.1.0_ghc-8.2.2.exe --builddir=.stack-work\dist\5c8418a7 configure --with-ghc=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.2\bin\ghc.EXE --with-ghc-pkg=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\ghc-8.2.2\bin\ghc-pkg.EXE --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\13cecb13\pkgdb --package-db=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\pkgdb --libdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\lib --bindir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\bin --datadir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\share --libexecdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\libexec --sysconfdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\etc --docdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\doc\haskell-project-0.1.0.0 --htmldir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\doc\haskell-project-0.1.0.0 --haddockdir=C:\Users\Michael\Desktop\haskell-project\.stack-work\install\ccbce92a\doc\haskell-project-0.1.0.0 --dependency=base=base-4.10.1.0 --dependency=containers=containers-0.5.10.2 --dependency=mtl=mtl-2.2.1-DscMMmDQUE6GBfOSl4qMUH --dependency=parsec=parsec-3.1.11-3BgBURmbRiVF8fgoxhAiBa --dependency=pretty-simple=pretty-simple-2.0.1.0-J3QTM6x6LHL5fhqavYvVhJ --dependency=text=text-1.2.2.2-9VTsh6V7U7hpagw2HDvpZ --extra-include-dirs=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin --extra-lib-dirs=C:\Users\Michael\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib --enable-tests --enable-benchmarks
Process exited with code: ExitFailure 1
What would be the steps to fix this or likely causes?
I managed to find a temporary solution for anybody who is having the same issue.
I downgraded cabal to version 1.24.0.2 and changed the resolver to using GHC version 8.0.1 (resolver: ghc-8.0.1).
After then running stack solver I'm now able to build.
The issue #3765 on the stack tracker has some workarounds for this, in addition to Michael's answer.
The best solution, it seems, is to unset __COMPAT_LAYER, which when set to INSTALLER can reproduce the bug.
C:\>set __COMPAT_LAYER=
The cause might be a bug in some versions of GHC, which is catching exceptions it ought to propagate to the user. If this is the case, there is an underlying problem, and this bug is hiding it.
Do please add a comment on the aforementioned issue, as it will help the maintainers track the prevalence of this problem.
Some time my project in MyEclipse show me the following error on compilation. Sometime by restarting MyEclipse the error message disappear.
Can you please tell me why this error occurs ?
Error message :
The container 'Struts 1.1 Libraries' references non existing library 'C:\MyEclipse\.......\org.eclipse.osgi\bundles\16\1\.cp\data\1.1\lib\commons-beanutils.jar' ROMO_ETD Build path Build Path Problem
Thanks a lot.
Looks like you might be using an old unsupported release of MyEclipse, so one option would be to upgrade to the latest release. Another would be to run MyEclipse with the -clean argument, once. The argument is mentioned here (for the eclipse Juno release, but it's similar for earlier releases): http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.user/tasks/running_eclipse.htm?cp=0_3_0
Basically, the argument is added to the command line or to the top of the myeclipse.ini file, in the folder containing the myeclipse.exe file. The argument can be removed after the first launch, as it slows down the launch.
For 2 days, I have been trying to fix my Android Studio setup, but despite a lot of googling have had no luck fixing this problem. Gradle keeps giving me the error
Error:Execution failed for task ':Android-Tabbedout-30:processQaReleaseResources'.
Error: A library uses the same package as this project
You can temporarily disable this error with android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0
If I add in the enforceUniquePackageName=false to the gradle file, then the project can be successively refreshed by Gradle, but once I try to run it I get this error:
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define
Any ideas on how to fix this?
I was searching for that same problem and i find this on github
https://github.com/DWorkS/AStickyHeader/issues/12
And this solved my problem.
All this says is to rename the package name on the AndroidManifast.xml file.
And its done.
I am using MonoDevelop version 2.4.2 with iOS SDK 4 installed. I am encountering a problem whereby simply adding -gcc_flags to the project [build/iphone build/extra arguments] setting causes linking errors in MonoDevelop.
This is easily reproducible, just create an empty iPhone Window-based Project. Confirm that it compiles correctly. Then add a simple include path with in [build/iphone build/extra arguments] as follows:
-v -v -v -gcc_flags "-I${ProjectDir}"
With this added, when I try compile I get the following linking errors (I have removed the paths to the temporary directory to make the error messages more readable):
main.m:9:26: error: mono/jit/jit.h: No such file or directory
main.m:10:36: error: mono/metadata/assembly.h: No such file or directory
main.m:11:39: error: mono/metadata/mono-config.h: No such file or directory
main.m:12:38: error: mono/metadata/mono-debug.h: No such file or directory
main.m:13:26: error: monotouch/gc.h: No such file or directory
main.m:14:33: error: monotouch/monotouch.h: No such file or directory
It seems, therefore, with the -gcc_flags option set that MonoDevelop does not seem to find the path to the required mono and monotouch header files. Is this a known problem? Does anyone know a work around for this problem?
I am new to MonoTouch, and so maybe I am doing something wrong here... and if I am, then I would appreciate it if someone could let me know what I am doing wrong and how I can get MonoTouch to compile with -gcc_flags set.
Thanks,
Bruce
Your MonoTouch and iOS SDK versions are out of sync. Install MonoTouch 3.2.4 and iOS SDK 4.2.