Can't compile the sashtest

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
HeReSY
Earned some good credits
Earned some good credits
Posts: 120
Joined: Fri Sep 17, 2004 8:58 pm
Location: Germany

Can't compile the sashtest

Post by HeReSY » Fri Dec 10, 2004 11:11 am

Can't compile the sashtest for playing around with more than two splitwindows.

compilerlog:
make.exe -f "E:\Backup\Download\wxWidgets-2.5.2\samples\sashtest\Makefile.win" all
windres.exe -i SashTest_private.rc --input-format=rc -o SashTest_private.res -O coff --include-dir c:/dev-cpp/include/

g++.exe sashtest.o SashTest_private.res -o "SashTest.exe" -L"c:/dev-cpp/lib" -mwindows -lwxmsw25 -lwxmsw25_gl -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregex -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32

c:/dev-cpp/lib/libwxmsw25.a(monolib_framecmn.o)(.text+0x11d0):framecmn.cpp: multiple definition of `wxFrameBase::SetToolBar(wxToolBar*)'
sashtest.o(.text$_ZN11wxFrameBase10SetToolBarEP9wxToolBar+0x0):sashtest.cpp: first defined here
c:/dev-cpp/lib/libwxmsw25.a(monolib_dynarray.o)(.text+0xd0):dynarray.cpp: multiple definition of `wxBaseArrayPtrVoid::wxBaseArrayPtrVoid()'
sashtest.o(.text$_ZN18wxBaseArrayPtrVoidC2Ev+0x0):sashtest.cpp: first defined here
sashtest.o(.rdata$_ZTV7MyChild+0x240):sashtest.cpp: undefined reference to `wxWindow::MSWShouldPreProcessMessage(void**)'
sashtest.o(.rdata$_ZTV7MyChild+0x244):sashtest.cpp: undefined reference to `wxWindow::MSWProcessMessage(void**)'
sashtest.o(.rdata$_ZTV7MyChild+0x248):sashtest.cpp: undefined reference to `wxMDIChildFrame::MSWTranslateMessage(void**)'
sashtest.o(.rdata$_ZTV8MyCanvas+0x240):sashtest.cpp: undefined reference to `wxWindow::MSWShouldPreProcessMessage(void**)'

sashtest.o(.rdata$_ZTV8MyCanvas+0x244):sashtest.cpp: undefined reference to `wxWindow::MSWProcessMessage(void**)'
sashtest.o(.rdata$_ZTV8MyCanvas+0x248):sashtest.cpp: undefined reference to `wxWindow::MSWTranslateMessage(void**)'
sashtest.o(.rdata$_ZTV7MyFrame+0x240):sashtest.cpp: undefined reference to `wxWindow::MSWShouldPreProcessMessage(void**)'
sashtest.o(.rdata$_ZTV7MyFrame+0x244):sashtest.cpp: undefined reference to `wxWindow::MSWProcessMessage(void**)'
sashtest.o(.rdata$_ZTV7MyFrame+0x248):sashtest.cpp: undefined reference to `wxMDIParentFrame::MSWTranslateMessage(void**)'
sashtest.o(.rdata$_ZTV16wxScrolledWindow+0x240):sashtest.cpp: undefined reference to `wxWindow::MSWShouldPreProcessMessage(void**)'
sashtest.o(.rdata$_ZTV16wxScrolledWindow+0x244):sashtest.cpp: undefined reference to `wxWindow::MSWProcessMessage(void**)'
sashtest.o(.rdata$_ZTV16wxScrolledWindow+0x248):sashtest.cpp: undefined reference to `wxWindow::MSWTranslateMessage(void**)'

make.exe: *** [SashTest.exe] Error 1
linker parameter in wxDevCPP Beta 6.4
-lwxmsw25
-lwxmsw25_gl
-lwxtiff
-lwxjpeg
-lwxpng
-lwxzlib
-lwxregex
-lwxexpat
-lkernel32
-luser32
-lgdi32
-lcomdlg32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lole32
-loleaut32
-luuid
-lrpcrt4
-ladvapi32
-lwsock32
-lodbc32
-lopengl32
I hope someone can help me.

HeReSY

NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL » Fri Dec 10, 2004 2:13 pm

How did you create the project for this?

What I do is once wxDevCpp is open, create a new do nothing project. File - New - Project... then in the dialog, I choose wxWidgets Frame.. choose a folder for the project (or create one if necessary) and save the project (actually I compile and run the project, which results in the files being saved, and on running. close the program ).

Now in the project files tree, right click on all files and choose "remove file", once the file list is empty, go File - New - Template, then fill in the dialog. DON'T FORGET, on the tab "Extra's" to select the three checkbox's at the bottom of the dialog "use projects include/libraries/resource directories"

Save this template.

Now try it out, File - New - Project..., select your newly created project, and save it in the folder you desire (in this case "sashtest"). Now in the files pane, right click over the project, choose "add Files" and select the files you desire - sashtest.c.

Press F9 and wait for your program to run (this works with 2.5.3 cos I've just done it).
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/

tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Post by tiwag » Wed Dec 22, 2004 10:13 am

@NinjaNL

it rocks, a really good method, thanks !

i played a long while whith importing MSVC .dsp files and so on,
but all samples are linked with the NON-Monolithic library version
of libwxmsw25 and therefore many manual changes in the project settings,
compiler & linker parameter's and directory settings are necessary

thanks

Post Reply