wxwebview unresolved external sympol

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
userwebview
In need of some credit
In need of some credit
Posts: 6
Joined: Sun Nov 19, 2017 5:30 pm

wxwebview unresolved external sympol

Post by userwebview »

I tried to use wxWebViewChromium but i got many link errors like these :

unresolved external symbol "public: virtual __thiscall wxWebViewChromium::~wxWebViewChromium(void)" (??1wxWebViewChromium@@UAE@XZ)

unresolved external symbol "public: virtual void __thiscall wxWebViewChromium::Stop(void)" (?Stop@wxWebViewChromium@@UAEXXZ)

I'm linking to wxlibs , libcef_dll_wrapper and libcef this is my code :

1 - main.h

Code: Select all

#include <wx\wx.h>
#include <wx\webview.h>
#include <wx\webviewfshandler.h>
#include <wx\webviewarchivehandler.h>
#include <wx\wxprec.h>
#include "webview_chromium.h"

#pragma comment (lib , "libcef_dll_wrapper.lib")
#pragma comment (lib , "libcef.lib")

class MyFrame : public wxFrame
{
public:
	MyFrame(wxString title);
	wxPanel *panel;
	wxBoxSizer *box;
	wxWebView *browser;
};

MyFrame::MyFrame(wxString title) : wxFrame(nullptr, wxID_ANY, title) {
	panel = new wxPanel(this, wxID_ANY, wxPoint(-1, -1));
	box = new wxBoxSizer(wxVERTICAL);
	wxWebView::RegisterFactory(wxWebViewBackendChromium,
		wxSharedPtr<wxWebViewFactory>
		(new wxWebViewFactoryChromium));
	browser = wxWebView::New(panel, wxID_ANY,"http://www.wxwidgets.org/",wxDefaultPosition, wxDefaultSize,wxWebViewBackendChromium);
	box->Add(browser, 1, wxEXPAND | wxALL, 0);
	panel->SetSizer(box);
}
2 - main.cpp

Code: Select all

#include "main.h"

class myApp : public wxApp
{
public:
	bool OnInit();
};

bool myApp::OnInit() {
	
	MyFrame *frame = new MyFrame("browser");
	frame->Show();
	return true;
}

IMPLEMENT_APP(myApp)
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxwebview unresolved external sympol

Post by ONEEYEMAN »

Hi,
Which compiler do you use? What OS? What version of wx?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19162
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxwebview unresolved external sympol

Post by doublemax »

You probably just forgot to add wxmsw31[ud]_webviewchromium.lib to the linker input files.
Use the source, Luke!
Post Reply