x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Linker Error on deriving from Webbrowser widget

Hi ,

I am geting linker error when I attempt to create a C++ class deriving from Webbrowser class. I want to add the following function in the newly created class.

  UFUNCTION(BlueprintCallable, Category="Web Browser")
   FString GetURL() const;

 FString UCustomWebBrowser::GetURL() const
 {
     if ( WebBrowserWidget.IsValid() )
     {
         return WebBrowserWidget->GetUrl();
     }
     
     return "";
 }

But this is giving error ->

Undefined symbols for architecture x86_64 "SWebBrowser::GetUrl() const", referenced from: UCustomWebBrowser::GetURL() const in CustomWebBrowser.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

this is related to the line WebBrowserWidget->GetUrl() , because if I comment the line , I don't get the error anymore.

Product Version: Not Selected
Tags:
more ▼

asked May 09 '16 at 08:19 AM in C++ Programming

avatar image

sameek4
145 39 40 69

avatar image GodOfPen May 09 '16 at 08:32 AM

SWebBrowser is in module 'WebBrowser', do you add this depend module in your build.cs file of your project?

avatar image sameek4 May 09 '16 at 08:56 AM

you are a life saver...thanks a million :D

avatar image GodOfPen May 09 '16 at 09:12 AM

you're welcome,and you can close this question :)

avatar image TinyCup May 25 '16 at 02:33 PM

Hi, we're trying to do the same thing, expose the GetURL of SWebBrower in the our CustomWebBrowse widgetr; can you please explain us steps to subclass the WebBrowser Widget to access the current URL? We tried to create a new C++ subclass of WebBrowser from the UE editor, but when we try to complie, VS shows us errors like: "use of undefined type 'SWebBrowser' and 'GetUrl': is not a member of 'TSharedPtr. Can you please address us in right direction? Thanks.

avatar image GodOfPen May 26 '16 at 01:05 AM

Hello,I'd like to help you,but this question is closed so if you need more information about this link error,please send email with your error image to me :1441842473@qq.com Usually the link error is because you not add the module 'WebBrowser' in your game module's .build.cs file. You can add this name such as:

 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore","WebBrowser" });


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed May 09 '16 at 09:15 AM by sameek4 for the following reason:

The question is answered, right answer was accepted


0 answers: sort voted first

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question