Error compiling a Qt program containing WebView - qt5

I created a new Qt5 project. All i do is drag a QWebView into my MainWindowUI. It gives me these errors:
error: undefined reference toimp__ZN8QWebViewC1EP7QWidget'`
and
error: undefined reference toimp__ZN8QWebView6setUrlERK4QUrl`
I havent even written a single line of code! Is something wrong with QtDesigner?

Add "webkit"( till Qt 4.7.4) or webkitwidgets(Qt5) on pro file. like "QT += core gui webkit", then clean and build.

Related

how to set "infragistics" carousel panel reference?

Which reference has xamcarouselpanel?
When I build my project I get an error that igwindows:XamCarouselPanel was not found. My code is:
igwindows:="http://infraistics.com/Windows"
and the error occur in:
igwindows:xamcarouselpanel.ViewSetting
If anyone has a link to this dll please attach it in the answer.
First of all you should write
xmlns:igwindows="http://infragistics.com/Windows"
in xaml in order to add a namespace and you should have corresponding reference in your project.
After you installed the Infragistics on your computer you should add InfragisticsWPF.XX.X reference.

Unity AppController.mm file causing error

I have created a new Xcode Project and added "Data", "Classes" & "Libraries" folder from the Xcode project generated by unity.Now AppController.mm is causing error.Below is the code where error is:
(surface->eaglLayer) = (CAEAGLLayer*)[view layer];
and Here is the error line:
Assigning to " void * " from incompatible type " CAEAGLLayer * "
When you export a Unity project to Xcode, Unity generated all needed thing for you, including adding all necessary frameworks and libraries, adding files should be compiled, setting up project file and some other things. When you create your new project in Xcode, and copy/paste the three folders to it, all of the things above are NOT get set. So you will have a lot of trouble in handling them. In your example, CAEAGLLayer is something related to OpenGL, and you should add OpenGLES.framework at least.
The conclusion is: DO NOT create project and copy/paste as that except you exactly know what you are doing. Otherwise it's not likely to make the project building and linking successfully. Always use the project Unity exported and modify things on it.

PNG Byte Swap at runtime

I've got an app that is generating thumbnails of images at runtime. But they're not in the optimized format that Xcode creates when images are added to a project. Is there a library or a function call I can use to convert these images?
Instructions:
Download DHowett (thanks, DHowett!) code from: https://github.com/DHowett/pincrush
Unzip and rename to DHowett and place next to the XCode sample project I placed (https://www.box.com/s/7dfb3e6f430d98d933c2), and run...
If/When you build your own project from scratch, then do the following immediately after unzipping and BEFORE adding the folder to your project:
Remove all makefile files from the folder
Drag the folder to your project
To overcome compiler warning "implicit declartion of function 'pincrush' is invalid in C99", changed project setting "C Language Dialect" to "GNU89"
When building, you'll get an error "'png.h" file not found" - to fix it, add DHowett/libpng to the project's Header Search Paths
open pincrush.c and comment out the "usage" and "main" functions (you don't need them, and the first causes compilation error, the second causes link errors)
Add an external reference to crush... See below: extern void crush(const char *infilename, const char *outfilename);
You can ignore the 8 compilation warnings of "Unused Entity Issue" caused by the "NEXT" macro
You may need to remove the .git* files from the project (some annyoing warnings...)
Enjoy, good luck!

build failed with: ld: duplicate symbol _OBJC_CLASS_$_Algebra5FirstViewController

I am getting this error suddenly when running my app via iPhone simulator:
clang: error: linker command failed with exit code 1 (use -v to see
invocation):
ld: duplicate symbol _OBJC_CLASS_$_Algebra5FirstViewController in
.../Algebra5-anwcuftojtxtgkfootneeeqhwztj/Build/Intermediates/Algebra5.build/Debug-iphonesimulator/Algebra5.build/Objects-normal/i386/ExercisesViewController.o
and
.../Algebra5-anwcuftojtxtgkfootneeeqhwztj/Build/Intermediates/Algebra5.build/Debug-iphonesimulator/PSLE
Algebra5.build/Objects-normal/i386/PSLE_Algebra5FirstViewController.o
for architecture i386
What is it all about?
It look like the class Algebra5FirstViewController is compile multiple time.
Can you make sure that the .m and .mm is only included once in your project sources in Xcode? You can also confirm this by checking in the compile log (last icon at the right, next to the breakpoints icon) and see that confirm that it is only compiled once.
Also, if this class is part of a library that you link against and you have a class with the same name, you could have the same error.
Finally, you can try a clean and rebuild, just in case the old object files are still present and there is some junk in the compiled files. Just in case...
EDIT
I also note that the second reference is made in the file for ExercisesViewController. Maybe there is something in this file. Either you #imported the Algebra5FirstViewController file instead of the .h, or the ExercisesViewController has #implementation (Algebra5FirstViewController) instead of #implementation (ExercisesViewController), or there was some junk with this file that will cleaned with a Clean an Rebuild.
That can happen if the same .m file is referenced multiple times in your target's "Compile Sources" section in "Build Phases". Remove duplicate entries and you should be fine.
also had this problem by declaring a const * NSString in the header file (incorrectly) instead of the implementation file (correctly)
I got this issue because I accidentally imported the .m instead of the .h. Hope reading this saves someone with same problem some time.
I had same problem. Got it solved!
If you have imported any files into project then check .m (main) file for same does exists in Targets (Project Name) -> Build Phases -> Compile Sources.
If file does not exists then include it using (+) Add button shown.
Also, if duplicate files exists (if any) then delete it.
Now press cmd+shift+k to clean the project. New Build should not display this error.
I got a similar error when adding files from another project, like #paiego explained. My error was that I didn't check "Add to targets". As explained above, I deleted the references and added the files again but this time checking "Add to targets".
I was getting similar error and I got it resolved this way.
Try to set Build Active Architecture Only to NO for 'Pods' project and
your app's target
In one case, I saw this error when dragging a new class' .h and .m into the project. The only solution I found was to remove the references to these files and then add them back via the project menu.
I met it when import a ViewController.m in TableViewController. Try to delete '#import "ViewController.m"' if it exited. Hope this help!
'linker command failed with exit code 1 (use -v to see invocation)'- I got this error when running a phonegap application on iPhone. I changed Build Active Architecture Only to Yes and it worked fine.
It seems that for m, I dragged the files into the project and after that didn't work, clicked file "add files to project". Both were the incorrect approach. just drag it into the projects folder (in finder) that houses the other .h and .m files.
once i got
18 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1
For me this was due to that i have used "const NSInteger" in my switch case.
What i did is change the const NSInteger to enum, and replace the reference with enum values.
This fixed the error for me.
This happens either, some files are missing in the "Compile Sources" section, or duplicate entries are found for some file(s). In my case, I had duplicate entries for two files, I deleted one entry for each of the files, that solved my problem. Hope this helps.
I found this article that provided a solution for me. It pertains to Xcode 7 where the default for No Common Blocks is Yes rather than No in previous versions.
This is a quote from the article:
The problem seems to be that the "No common blocks" in the "Apple LLVM
6.1 - Code Generation" section in the Build settings pane is set to Yes, in the latest version of Xcode.
This caused what I will describe as circular references where a class that was included in my Compile Sources was referenced via a #import in another source file (appDelegate.m). This caused duplicate blocks for variables that were declared in the original base class.
Changing the value to No immediately enabled my app to compile and resolved my problem.
I'm posting a new answer to this because I ran into this error and had to use a different solution that I think is specific to iOS 9.
I had to explicitly disable the Enable Bitcode in Build Settings, which is automatically turned on in the update.
Referenced answer: New warnings in iOS 9
[XCODE 7.1 UPDATE]
First Option That Worked:
I changed the Deployment Target from 7.1 to 8.1 and the error went away.
Hope that helps someone.
UPDATE (day 2): Second time I'm back here in 2 days.
On day 2 I started to get more errors in addition to this annoying error. The problem was a conflicting file that Xcode didn't recognize. I used the links below as help:
"_OBJC_CLASS_$_viewsampleViewController", referenced from:
‘ld: warning: directory not found for option’
And ultimately:
"_OBJC_CLASS_$_viewsampleViewController", referenced from:
I was deleting everything from the FrameWork Search Paths + Compile Resources + Run Script Phases + the pods and then re-installing them again to ultimately find success.
The issue on my size (on day 2) was more of a problem with conflicting files or files that Xcode didn't recognize.
But ultimately, removing everything (mentioned above and in the links), cleaning a lot of times and reinstalling the pods/frameworks/run script phases helped.
Really hope this helps someone.
Running Xcode 4.6.3 on OSX 10.7.5 was able to fix this error by changing Architectures to Native Architecture of Build Machine from $(NATIVE_ARCH_ACTUAL).
I received this once by (accidentally) importing both the .h and .m files into the same class.
I got this error while implementing a subclass without the necessary framework added (MPMoviePlayerController without the MediaPlayer framework, in this example)
I got this same issue when working with Bolts.framework. It turns out that when Bolts gets corrupted, no amount of re-importing will fix the issue. I had to go back to the original download file and reimport it completely from scratch. This fixed it right away. It was such a weird issue that it took me forever to figure it out... hopefully this tip will spare some of you from the same frustrations :)
This occurred for me when I named a UILabel reference and an int the same thing, I didn't get an error when I typed it only when I tried to run it so I didn't realize that that was the problem, but if you have something like a label which is the "score" and you call it score, and name an int which is the score also score then this problem occurs.
Variations on this issue can occur if you have a missing library or file. Check there aren't any missing files in your Project Explorer: they'll be written in red if Xcode can't find them.
"Link Binary With Libraries" had old project name pod library. Fixed after removal.
List item
Project
Build Phases
Link Binary With Libraries
Remove deprecated library.
I had this same issue with a library, and I tried all of the answers listed here and nothing helped.
I ended up simply removing the library from Link Binary With Libraries and then re-adding it and it worked fine.
The only (and unfailing) way to resolve this issue is building test from command line:
xcodebuild -workspace MyProject.xcworkspace/ -scheme MyScheme -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 7,OS=10.3.1' test
So, at this point, your compilation will surely fail but you'll see all linking problem. In my case, I had several problem such as:
ld: framework 'Foo' not found
To resolve this, you need to on your target, BuildSettings->Linking->OtherLinkerFlags and remove 'Foo' framework .
Use of unresolved identifier 'ClassName' .
To resolve this, I need to add/check file's target membership to UITest target too.
Other possible problems will be raised by xcodebuild and you can easily fix it.
Simply cleaning CMD + SHIFT + K, then building CMD + B worked for me.
In my case I had a reference to a library in Other Linker Flags. Removing it got rid of the error.
I had the same error.
I had imported a audio frame work that i was no longer using. I removed it (DO NOT DELETE IT!) and it built successfully.

Wrapper class error

I added a dll to my project. There was some error in the wrapper class so I removed that from my project. Now the trouble is whenever I build my solution, following error appears:
"Error 1 Failed to create the wrapper assembly for type library "AxUrdu_Unicode_TextBox". Compiler errors occurred when generating a Windows Forms wrapper for ActiveX control 'AxUrdu_Unicode_TextBox'. Source code saved in 'obj\Debug\AxInterop.Urdu_Unicode_TextBox.cs'.
c:\Users\Kh. Furqn\AppData\Local\Temp\mhveuttt.0.cs(30,38) : error CS0407: 'object AxUrdu_Unicode_TextBox.AxctlUrduText.About()' has the wrong return type
D:.Net Programs\School Manager\School Manager\School Manager\AxUrdu_Unicode_TextBox School Manager
"
I have done Clean Solution several times but error does not go away. Please help.
Thanks
I am presumming that you have a WinForms App, try looking in your Designer.vb file to check if there are any reference's to the Dll that gave you a problem.