开发者

Error compiling / linking e text editor on Linux

The code compiles without too much complaint, but the last step fails with the error below. There is some discussion about it on the e forum, but still no answer.

/usr/bin/ld: Warning: size of symbol `_pcre_utt_names' changed from 657 in .objs.release/cx_pcre_tables.o to 740 in ../external/out.release/lib/libpcre.a(pcre_tables.o)
/usr/bin/ld: Warning: size of symbol `_pcre_utt' changed from 630 in .objs.release/cx_pcre_tables.o to 696 in ../external/out.release/lib/libpcre.a(pcre_tables.o)
.objs.release/cx_pcre_exec.o: In function `match(doc_byte_iter, unsigned char const*, doc_byte_iter, int, match_data*, unsigned long, eptrblock*, int, unsigned int)':
cx_pcre_exec.cpp:(.text+0x1c2a): undefined reference to `_pcre_ord2utf8(int, unsigned char*)'
.objs.release/eauibook.o: In function `eAuiNotebook::LoadPerspective(wxString const&)':
eauibook.cpp:(.text+0x9ad): undefined reference to `wxTabFrame::SetTabCtrlHeight(int)'
.objs.release/PreviewDlg.o: In function `global constructors keyed to _ZN10PreviewDlg13sm_eventTableE':
PreviewDlg.cpp:(.text+0x11b2): undefined reference to `wxEVT_WEB_TITLECHANGE'
PreviewDlg.cpp:(.text+0x11ee): undefined reference to `wxEVT_WEB_DOMCONTENTLOADED'
.objs.release/PreviewDlg.o: In function `PreviewDlg::RefreshBrowser(PreviewDlg::cxUpdateMode)':
PreviewDlg.cpp:(.text+0x2a47): undefined reference to `wxWebControl::OpenURI(wxString const&, unsigned int, wxWebPostData*, bool)'
.objs.release/PreviewDlg.o: In function `PreviewDlg::OnWebDocumentComplete(wxWebEvent&)':
PreviewDlg.cpp:(.text+0x3259): undefined reference to `wxWebControl::GetCurrentURI() const'
.objs.release/PreviewDlg.o: In function `PreviewDlg::PreviewDlg(EditorFrame&)':
PreviewDlg.cpp:(.text+0x4984): undefined reference to `wxWebControl::IsInitialized()'
PreviewDlg.cpp:(.text+0x49c5): undefined reference to `wxWebControl::wxWebControl(wxWindow*, int, wxPoint const&, wxSize const&)'
PreviewDlg.cpp:(.text+0x562f): undefined reference to `wxWebControl::InitEngine(wxString const&)'
.objs.release/PreviewDlg.o: In function `PreviewDlg::PreviewDlg(EditorFrame&)':
PreviewDlg.cpp:(.text+0x68e4): undefined reference to `wxWebControl::IsInitialized()'
PreviewDlg.cpp:(.text+0x6925): undefined reference to `wxWebControl::wxWebControl(wxWindow*, int, wxPoint const&, wxSize const&)'
PreviewDlg.cpp:(.text+0x758f): undefined reference to `wxWebControl::InitEngine(wxString const&)'
.objs.release/PreviewDlg.o: In function `PreviewDlg::OnButtonForward(wxCommandEvent&)':
PreviewDlg.cpp:(.text+0x132): undefined reference to `wxWebControl::GoForward()'
.objs.release/PreviewDlg.o: In function `PreviewDlg::OnButtonBack(wxCommandEvent&)':
PreviewDlg.cpp:(.text+0x182): undefined reference to `wxWebControl::GoBack()'
../ecore/libecore.so(cxInternal.o): In function `cxInternal::MoveOldSettings(eSettings&)':
cxInternal.cpp:(.text+0x4d29): undefined reference to `eSettings::SetPageSettings(unsigned int, wxString const&, doc_id, int, int, wxString const&, std::vector<unsigned int, std::allocator<unsigned int> > const&, std::vector<cxBookmark, std::allocator<cxBookmark> > const&, eSettings::SubPage)'
collect2: ld returned 1 exit status

Also, here is the link command (sorry I didn't include it before - I had to set VERBOSE=1 to get it):

g++ -Wl,-z,muldefs -o e .objs.release/AutoPairs.o .objs.release/Bookmarks.o .objs.release/BracketHighlight.o .objs.release/BundleItemEditorCtrl.o .objs.release/BundleManager.o .objs.release/BundleMenu.o .objs.release/BundlePane.o .objs.release/Cell.o .objs.release/ChangeCheckerThread.o .objs.release/CloseButton.o .objs.release/Colours.o .objs.release/CommitDlg.o .objs.release/CompareDlg.o .objs.release/CompletionPopup.o .objs.release/CurrentTabsPopup.o .objs.release/cx_pcre_chartables.o .objs.release/cx_pcre_exec.o .objs.release/cx_pcre_newline.o .objs.release/cx_pcre_tables.o .objs.release/cx_pcre_try_flipped.o .objs.release/cx_pcre_valid_utf8.o .objs.release/cx_pcre_xclass.o .objs.release/DetectTripleClicks.o .objs.release/DiffBar.o .objs.release/DiffDirPane.o .objs.release/DiffMarkBar.o .objs.release/DiffPanel.o .objs.release/DirWatcher.o .objs.release/Dispatcher.o .objs.release/DocHistory.o .objs.release/Document.o .objs.release/eAbout.o .objs.release/eApp.o .objs.release/EasyPlistWriter.o .objs.release/eauibook.o .objs.release/EditorBundlePanel.o .objs.release/EditorCtrl.o .objs.release/EditorFrame.o .objs.release/EditorPrintout.o .objs.release/eDockArt.o .objs.release/eDocumentPath.o .objs.release/eIpcServer.o .objs.release/Env.o .objs.release/EnvVarsPanel.o .objs.release/eSettings.o .objs.release/Execute.o .objs.release/FastDC.o .objs.release/FileActionThread.o .objs.release/FindCmdDlg.o .objs.release/FindInProjectDlg.o .objs.release/FixedLine.o .objs.release/Fold.o .objs.release/ftpparse.o .objs.release/GotoFileDlg.o .objs.release/GotoLineDlg.o .objs.release/GutterCtrl.o .objs.release/HtmlOutputPane.o .objs.release/jsonreader.o .objs.release/jsonval.o .objs.release/jsonwriter.o .objs.release/key_hook.o .objs.release/LineListNoWrap.o .objs.release/LineListWrap.o .objs.release/Lines.o .objs.release/matchers.o .objs.release/MultilineDataObject.o .objs.release/OpenDocDlg.o .objs.release/plistHandler.o .objs.release/PreviewDlg.o .objs.release/ProjectInfo.o .objs.release/ProjectInfoHandler.o .objs.release/ProjectPane.o .objs.release/ProjectSettings.o .objs.release/RedoDlg.o .objs.release/RemoteLoginDlg.o .objs.release/RemoteProfileDlg.o .objs.release/RemoteThread.o .objs.release/ReplaceStringParser.o .objs.release/RevTooltip.o .objs.release/RunCmdDlg.o .objs.release/SaveDlg.o .objs.release/SearchListBox.o .objs.release/SearchPanel.o .objs.release/SeparatorLine.o .objs.release/SettingsDlg.o .objs.release/ShareDlg.o .objs.release/ShellRunner.o .objs.release/ShortcutCtrl.o .objs.release/SnippetHandler.o .objs.release/StatusBar.o .objs.release/StringHistorySetting.o .objs.release/Strings.o .objs.release/styler_searchhl.o .objs.release/styler_syntax.o .objs.release/StyleRun.o .objs.release/styler_users.o .objs.release/SymbolList.o .objs.release/SyncThread.o .objs.release/TextTip.o .objs.release/ThemeEditor.o .objs.release/Timeline.o .objs.release/tmKey.o .objs.release/tm_syntaxhandler.o .objs.release/UndoHistory.o .objs.release/UpdaterThread.o .objs.release/urlencode.o .objs.release/Utf.o .开发者_StackOverflowobjs.release/VersionTree.o .objs.release/WebKitHtmlWnd.o .objs.release/wxListCtrlEx.o -L../external/out.release/lib -L../ecore -lecore -lcurl -ltomcrypt -ltommath -lmk4 -lpcre -ltinyxml -lwxwebkit -lwebcore-wx -ljscore -L/home/ty/Desktop/etexteditor-e-811bf09/external/out.release/lib -pthread   /home/ty/Desktop/etexteditor-e-811bf09/external/out.release/lib/libwx_gtk2u-2.8.a -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lm -lgio-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lXinerama -lSM -lpng -lz -ljpeg -lwxregexu-2.8 -lz -ldl -lm  /home/ty/Desktop/etexteditor-e-811bf09/external/out.release/lib/libwx_gtk2u-2.8.a -lsqlite3 -lxslt -lxml2   -lm -L/usr/lib -licui18n -licuuc -licudata -lm

EDIT: Forgot the link http://github.com/etexteditor/e

EDIT2: -Wl,-z,muldefs got rid of a few of the errors - Thx FX!


The PCRE library is included twice in your link command-line (that you didn't show us; how great is my magic ball?!). Once in ../external/out.release/lib/libpcre.a, and the second time as individual objects in .objs.release/cx_pcre_tables.o. Thus, you have these "multiply defined" errors. Try removing -lpcre, or removing the object files.

Or, even simpler, let the linker ignore these by giving it the -z muldefs option (-Wl,-z,muldefs if you pass it to gcc).


Finally got it to compile: http://www.e-texteditor.com/forum/viewtopic.php?p=14953#14953

Thanks ajpalkovic!

The key is to use ajpalkovic's fork: http://github.com/ajpalkovic/e/archives/linux

It is not quite ready for the primetime, but this is a huge step forward.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜