Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Problems compiling the samples

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Problems compiling the samples
#4388
Posted by: HeReSY 2004-06-08 19:15:12
Hi,

i have a problem compiling the contrib samples.
I installed the devpacks for wxwidgets 2.4.2 and the contrib devpack.
Then i started a new projekt to test the frame layout.
I copied the sample file to my projekt folder an added this one to my project.
When I compile my project, the compiler said, "In file included from fl_sample1.cpp"

What does thie error means?

I hope you could help me, because I want to use the frame layout in my project

HeReSY
Message2. Re: Problems compiling the samples
#4389
Posted by: upCASE 2004-06-08 19:41:30
Hi!
Please post the full compile log. "In file included from fl_sample1.cpp" is just a part of it (the important part follows after that), meaning that there's an error with one of the file included yb fl_sample1.cpp.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Problems compiling the samples
#4390
Posted by: HeReSY 2004-06-08 21:02:18
Hi,

I hope that this is what you want.
the Linker Error are some new errors, when I do a complete rebuild.
Compiler: Default compiler
Building Makefile: "C:\Dokumente und Einstellungen\HeReSY\Eigene Dateien\Neuer Ordner\Makefile.win"
Führt  make clean aus
rm -f fl_sample1.o  Projekt1.exe

g++.exe -c fl_sample1.cpp -o fl_sample1.o -I"D:/Dev-Cpp/include/c++"  -I"D:/Dev-Cpp/include/c++/mingw32"  -I"D:/Dev-Cpp/include/c++/backward"  -I"D:/Dev-Cpp/include" -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DHAVE_W32API_H  -D__WXMSW__ -D__WINDOWS__ -Wall -fno-pcc-struct-return -O2 -Os -fno-rtti -fno-exceptions 

In file included from fl_sample1.cpp:26:
D:/Dev-Cpp/include/wx/fl/controlbar.h: In member function `int
   cbArrayFloat::Index(float, bool) const':
D:/Dev-Cpp/include/wx/fl/controlbar.h:828: warning: passing `
   _wxArraycbArrayFloat' for argument 1 of `int wxBaseArrayLong::Index(long
   int, bool) const'
D:/Dev-Cpp/include/wx/fl/controlbar.h: In member function `void
   cbArrayFloat::Add(float, unsigned int)':
D:/Dev-Cpp/include/wx/fl/controlbar.h:828: warning: passing `
   _wxArraycbArrayFloat' for argument 1 of `void wxBaseArrayLong::Add(long int,
   unsigned int)'
D:/Dev-Cpp/include/wx/fl/controlbar.h: In member function `void

   cbArrayFloat::Insert(float, unsigned int, unsigned int)':
D:/Dev-Cpp/include/wx/fl/controlbar.h:828: warning: passing `
   _wxArraycbArrayFloat' for argument 1 of `void wxBaseArrayLong::Insert(long
   int, unsigned int, unsigned int)'

g++.exe fl_sample1.o  -o "Projekt1.exe" -L"D:/Dev-Cpp/lib" -mwindows -Wl,--subsystem,windows -mwindows -lwxmsw -lstdc++ -lgcc -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid  

fl_sample1.o(.text+0x651):fl_sample1.cpp: undefined reference to `wxFrameLayout::wxFrameLayout(wxWindow*, wxWindow*, bool)'
fl_sample1.o(.text+0x66c):fl_sample1.cpp: undefined reference to `cbBarHintsPlugin::sm_classcbBarHintsPlugin'
fl_sample1.o(.text+0x69b):fl_sample1.cpp: undefined reference to `cbDimInfo::cbDimInfo(int, int, int, int, int, int, bool, int, int, cbBarDimHandlerBase*)'
fl_sample1.o(.text+0x787):fl_sample1.cpp: undefined reference to `cbDimInfo::~cbDimInfo()'
fl_sample1.o(.text+0x941):fl_sample1.cpp: undefined reference to `wxFrameLayout::wxFrameLayout(wxWindow*, wxWindow*, bool)'
fl_sample1.o(.text+0x95c):fl_sample1.cpp: undefined reference to `cbBarHintsPlugin::sm_classcbBarHintsPlugin'
fl_sample1.o(.text+0x98b):fl_sample1.cpp: undefined reference to `cbDimInfo::cbDimInfo(int, int, int, int, int, int, bool, int, int, cbBarDimHandlerBase*)'
fl_sample1.o(.text+0xa77):fl_sample1.cpp: undefined reference to `cbDimInfo::~cbDimInfo()'

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

Message4. Re: Problems compiling the samples
#4391
Posted by: upCASE 2004-06-08 22:18:21
Hi!
Ja, genau das brache ich ;)

Yes, exactly what we need. The first part only shows some warnings. This may actually not be a problem at all.
The second part shows some undefined references and that causes the problem. You'll have to add the library that contains the FL code to you linker settings. Normally the lib will have a name like libwxfl.a or something similar. In that case add -lwxfl to you linker settings and include the path to the lib in the settings for your dirs.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: Problems compiling the samples
#4394
Posted by: HeReSY 2004-06-08 22:58:25
Hi,

Yes it works. But I have the same Error when rebuild the whole app. After rebuilding and then pressing F9 the app runs.

HeReSY
Message6. Re: Problems compiling the samples
#4404
Posted by: upCASE 2004-06-09 14:48:36
Hi!
What error? Or do you mean that adding the lib helped, but you still get the warnings when recompiling?
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message7. Re: Problems compiling the samples
#4410
Posted by: 2004-06-09 23:56:11
import the widget.dsp  --->It's work!
compiling--------->error!

compiler log

?s????: Default compiler
Building Makefile: "F:\Dev-Cpp\wx\samples\widgets\Makefile.win"
°??????× '' make...''
make.exe -f "F:\Dev-Cpp\wx\samples\widgets\Makefile.win" all
windres.exe -i widgets_private.rc -I rc -o widgets_private.res -O coff  --include-dir F:/Dev-Cpp/include/wx/msw --include-dir F:/Dev-Cpp/wx/samples/widgets

windres.exe: can't open cursor file `wx/msw/hand.cur': No such file or directory

make.exe: *** [widgets_private.res] Error 1

°?????§?

PS:My "hand.cur" file in current directary
Message8. Re: Problems compiling the samples
#4414
Posted by: HeReSY 2004-06-11 02:03:33
@upcase
I get the warning when recompiling.

@Alvin Tseng
Just remove the rc file from the project, then it will work. i had the same error, but I don't need the cur files.

HereSY
Message9. Re: Problems compiling the samples
#4423
Posted by: upCASE 2004-06-11 14:51:37
Hi!
Just leave the warnings alone. They may not be nice to have in the compile log, but since the program works you don't have to care about them. To have them go away look at the lines the warning messages give you and try to pass the correct arguments to the methods.
upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sun 2024-10-6  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0