Codelite 4.1 - linking with wxStyledTextCtrl
Posted: Thu Aug 30, 2012 12:34 pm
On Windows XP
Having upgraded to the latest Codelite 4.1 (using install file codelite-4.1.5770-mingw4.6.1-wx2.9.4.exe), most projects recompile/link with no issues.
However I have a few projects where the wxStyledTextCtrl component is used and I can't get these to link. Typical build output is as follows
----------Building project:[ WxRequirementsChecker - Debug ]----------
mingw32-make.exe[1]: Entering directory `D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker'
windres -i "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/resources.rc" --use-temp-file --define __WXMSW__ --define _UNICODE --include-dir C:\wxWidgets-2.9.4\lib\gcc_dll\mswu --include-dir C:\wxWidgets-2.9.4\include --define WXUSINGDLL -o ./Debug/resources.rc.o
g++ -c "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/gui.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/gui.o -I. -I"D:\CodeLiteWorkspaces\ActiveProjects"/WxReusablesLib
g++ -c "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/main.o -I. -I"D:\CodeLiteWorkspaces\ActiveProjects"/WxReusablesLib
g++ -c "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/RequirementsExtractor.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/RequirementsExtractor.o -I. -I"D:\CodeLiteWorkspaces\ActiveProjects"/WxReusablesLib
g++ -o ./Debug/WxRequirementsChecker @"D:\CodeLiteWorkspaces\ActiveProjects\WxRequirementsChecker\WxRequirementsChecker.txt" -L. -L../WxReusablesLib/Debug -lWxReusablesLib -mwindows -mthreads -LC:\wxWidgets-2.9.4\lib\gcc_dll -lwxmsw29ud_xrc -lwxmsw29ud_aui -lwxmsw29ud_html -lwxmsw29ud_adv -lwxmsw29ud_core -lwxbase29ud_xml -lwxbase29ud_net -lwxmsw29ud_richtext -lwxbase29ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
./Debug/main.o: In function `ZN9MainFrame14SetResultsFontER6wxFont':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:330: undefined reference to `_imp___ZN16wxStyledTextCtrl12StyleSetFontEiR6wxFont'
./Debug/main.o: In function `ZN9MainFrame16SetResultsColourERK8wxColour':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:336: undefined reference to `_imp___ZN16wxStyledTextCtrl18StyleSetBackgroundEiRK8wxColour'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:339: undefined reference to `_imp___ZN16wxStyledTextCtrl18StyleSetBackgroundEiRK8wxColour'
./Debug/main.o: In function `ZN9MainFrame24CreateAdditionalGUIItemsEv':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:351: undefined reference to `_imp__wxSTCNameStr'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:351: undefined reference to `_imp___ZN16wxStyledTextCtrlC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxString'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:354: undefined reference to `_imp___ZN16wxStyledTextCtrl13StyleClearAllEv'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:355: undefined reference to `_imp___ZN16wxStyledTextCtrl8SetLexerEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:356: undefined reference to `_imp___ZN16wxStyledTextCtrl11SetKeyWordsEiRK8wxString'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:357: undefined reference to `_imp___ZN16wxStyledTextCtrl11SetKeyWordsEiRK8wxString'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:358: undefined reference to `_imp___ZN16wxStyledTextCtrl16SetSelBackgroundEbRK8wxColour'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:359: undefined reference to `_imp___ZN16wxStyledTextCtrl16SetSelForegroundEbRK8wxColour'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:361: undefined reference to `_imp___ZN16wxStyledTextCtrl10SetEOLModeEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:362: undefined reference to `_imp___ZN16wxStyledTextCtrl11SetWrapModeEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:363: undefined reference to `_imp___ZN16wxStyledTextCtrl14SetMarginWidthEii'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:364: undefined reference to `_imp___ZN16wxStyledTextCtrl14SetMarginWidthEii'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:365: undefined reference to `_imp___ZN16wxStyledTextCtrl25SetUseHorizontalScrollBarEb'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:366: undefined reference to `_imp___ZN16wxStyledTextCtrl23SetUseVerticalScrollBarEb'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:367: undefined reference to `_imp___ZN16wxStyledTextCtrl13SetMarginLeftEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:370: undefined reference to `_imp___ZN16wxStyledTextCtrl14SetExtraAscentEi'
./Debug/RequirementsExtractor.o: In function `ZN22CRequirementsExtractor7DisplayEP16wxStyledTextCtrl':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/RequirementsExtractor.cpp:107: undefined reference to `_imp___ZN16wxStyledTextCtrl8ClearAllEv'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/WxRequirementsChecker] Error 1
WxRequirementsChecker.mk:76: recipe for target `Debug/WxRequirementsChecker' failed
mingw32-make.exe[1]: Leaving directory `D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker'
mingw32-make.exe: *** [All] Error 2
ActiveProjects_wsp.mk:4: recipe for target `All' failed
----------Build Ended----------
20 errors, 0 warnings, total time: 00:00:19 seconds
So far I've tried the following linker options, none have worked ...
-mwindows;$(shell wx-config --debug=yes --libs --unicode=yes)
-mwindows;$(shell wx-config --debug=yes --libs stc --unicode=yes)
-mwindows;$(shell wx-config --debug=yes --libs wxstc --unicode=yes)
-mwindows;$(shell wx-config --debug=yes --libs core;base;adv;stc --unicode=yes)
I've also tried the usual full retag of the workspace, cleaning allprojects but this hasn't worked either.
Please can someone suggest what options I need?
Many thanks, Colin
Having upgraded to the latest Codelite 4.1 (using install file codelite-4.1.5770-mingw4.6.1-wx2.9.4.exe), most projects recompile/link with no issues.
However I have a few projects where the wxStyledTextCtrl component is used and I can't get these to link. Typical build output is as follows
----------Building project:[ WxRequirementsChecker - Debug ]----------
mingw32-make.exe[1]: Entering directory `D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker'
windres -i "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/resources.rc" --use-temp-file --define __WXMSW__ --define _UNICODE --include-dir C:\wxWidgets-2.9.4\lib\gcc_dll\mswu --include-dir C:\wxWidgets-2.9.4\include --define WXUSINGDLL -o ./Debug/resources.rc.o
g++ -c "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/gui.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/gui.o -I. -I"D:\CodeLiteWorkspaces\ActiveProjects"/WxReusablesLib
g++ -c "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/main.o -I. -I"D:\CodeLiteWorkspaces\ActiveProjects"/WxReusablesLib
g++ -c "D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/RequirementsExtractor.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/RequirementsExtractor.o -I. -I"D:\CodeLiteWorkspaces\ActiveProjects"/WxReusablesLib
g++ -o ./Debug/WxRequirementsChecker @"D:\CodeLiteWorkspaces\ActiveProjects\WxRequirementsChecker\WxRequirementsChecker.txt" -L. -L../WxReusablesLib/Debug -lWxReusablesLib -mwindows -mthreads -LC:\wxWidgets-2.9.4\lib\gcc_dll -lwxmsw29ud_xrc -lwxmsw29ud_aui -lwxmsw29ud_html -lwxmsw29ud_adv -lwxmsw29ud_core -lwxbase29ud_xml -lwxbase29ud_net -lwxmsw29ud_richtext -lwxbase29ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
./Debug/main.o: In function `ZN9MainFrame14SetResultsFontER6wxFont':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:330: undefined reference to `_imp___ZN16wxStyledTextCtrl12StyleSetFontEiR6wxFont'
./Debug/main.o: In function `ZN9MainFrame16SetResultsColourERK8wxColour':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:336: undefined reference to `_imp___ZN16wxStyledTextCtrl18StyleSetBackgroundEiRK8wxColour'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:339: undefined reference to `_imp___ZN16wxStyledTextCtrl18StyleSetBackgroundEiRK8wxColour'
./Debug/main.o: In function `ZN9MainFrame24CreateAdditionalGUIItemsEv':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:351: undefined reference to `_imp__wxSTCNameStr'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:351: undefined reference to `_imp___ZN16wxStyledTextCtrlC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxString'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:354: undefined reference to `_imp___ZN16wxStyledTextCtrl13StyleClearAllEv'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:355: undefined reference to `_imp___ZN16wxStyledTextCtrl8SetLexerEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:356: undefined reference to `_imp___ZN16wxStyledTextCtrl11SetKeyWordsEiRK8wxString'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:357: undefined reference to `_imp___ZN16wxStyledTextCtrl11SetKeyWordsEiRK8wxString'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:358: undefined reference to `_imp___ZN16wxStyledTextCtrl16SetSelBackgroundEbRK8wxColour'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:359: undefined reference to `_imp___ZN16wxStyledTextCtrl16SetSelForegroundEbRK8wxColour'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:361: undefined reference to `_imp___ZN16wxStyledTextCtrl10SetEOLModeEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:362: undefined reference to `_imp___ZN16wxStyledTextCtrl11SetWrapModeEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:363: undefined reference to `_imp___ZN16wxStyledTextCtrl14SetMarginWidthEii'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:364: undefined reference to `_imp___ZN16wxStyledTextCtrl14SetMarginWidthEii'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:365: undefined reference to `_imp___ZN16wxStyledTextCtrl25SetUseHorizontalScrollBarEb'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:366: undefined reference to `_imp___ZN16wxStyledTextCtrl23SetUseVerticalScrollBarEb'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:367: undefined reference to `_imp___ZN16wxStyledTextCtrl13SetMarginLeftEi'
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/main.cpp:370: undefined reference to `_imp___ZN16wxStyledTextCtrl14SetExtraAscentEi'
./Debug/RequirementsExtractor.o: In function `ZN22CRequirementsExtractor7DisplayEP16wxStyledTextCtrl':
D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker/RequirementsExtractor.cpp:107: undefined reference to `_imp___ZN16wxStyledTextCtrl8ClearAllEv'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/WxRequirementsChecker] Error 1
WxRequirementsChecker.mk:76: recipe for target `Debug/WxRequirementsChecker' failed
mingw32-make.exe[1]: Leaving directory `D:/CodeLiteWorkspaces/ActiveProjects/WxRequirementsChecker'
mingw32-make.exe: *** [All] Error 2
ActiveProjects_wsp.mk:4: recipe for target `All' failed
----------Build Ended----------
20 errors, 0 warnings, total time: 00:00:19 seconds
So far I've tried the following linker options, none have worked ...
-mwindows;$(shell wx-config --debug=yes --libs --unicode=yes)
-mwindows;$(shell wx-config --debug=yes --libs stc --unicode=yes)
-mwindows;$(shell wx-config --debug=yes --libs wxstc --unicode=yes)
-mwindows;$(shell wx-config --debug=yes --libs core;base;adv;stc --unicode=yes)
I've also tried the usual full retag of the workspace, cleaning allprojects but this hasn't worked either.
Please can someone suggest what options I need?
Many thanks, Colin