Guidance Forums / wxWidgets (wxWindows) in C++ / Compiling Problem

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Compiling Problem
Posted by: 2004-06-24 23:20:46
I've been trying to compile the example at this web page:

but each time I try to compile it i get this error report:

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Projects\"
Executing  make...
make.exe -f "C:\Dev-Cpp\Projects\" all
windres.exe -i Project1_private.rc -I rc -o Project1_private.res -O coff

g++.exe main.o base.o Project1_private.res -o "Project1.exe" -L"C:/Dev-Cpp/lib" -mwindows -lwxmsw -lole32 -lwsock32 -lcomctl32 -lctl3d32 -lgcc -lstdc++ -lshell32 -loleaut32 -ladvapi32 -luuid -lodbc32 -ltiff -lpng -ljpeg -lzlib 

base.o(.text+0x0):base.cpp: multiple definition of `wxCreateApp()'
main.o(.text+0x14):main.cpp: first defined here
base.o(.text+0x42):base.cpp: multiple definition of `wxGetApp()'
main.o(.text+0x56):main.cpp: first defined here
base.o(.bss+0x0):base.cpp: multiple definition of `wxTheAppInitializer'
main.o(.bss+0x48):main.cpp: first defined here

make.exe: *** [Project1.exe] Error 1

Execution terminated

I hope you guys can help me. I've been tryng to make my first GUI for the last three days, but i keep on getting problem after problem.
Message2. Re: Compiling Problem
Posted by: upCASE 2004-06-25 02:38:23
From your compiler log and the source on the site you mentioned I see that you added a file. In the tutorial there's only base.h and base.cpp. In your version there is a main.cpp. Have you tried deleteing the main.cpp from the project and only compile the base.* stuff?
If the doesn't work: Please post your code. I'm sure it's not that much and it would really help to comment on the errors.
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Compiling Problem
Posted by: 2004-06-25 03:31:07
Thank you very much upCASE. Each time a start a new project in Dev-C++, main.cpp is there by default. I thought that I was supposed to keep it there. You seem to be the person that answers all the questions around ;) lol.
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Tue 2024-7-16  Guidance Laboratory Inc. Hits:0