User forums > Help

Problems to make GUI application using wxWidget library to work at first time

<< < (2/2)

MortenMacFly:

--- Quote from: studsbr on June 17, 2006, 05:11:48 pm ---
--- Code: ---mingw32-g++.exe   -LC:\desenv\wxWidgets-2.6.3\lib\gcc_lib  -L"C:\Arquivos de programas\CodeBlocks\lib" -o C:\desenv\projetos\teste.exe .objs\main.o .objs\app.o        C:\desenv\wxWidgets-2.6.3\lib\gcc_dll\libwxmsw26u.a -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid  -mwindows

--- End code ---

--- End quote ---
What I don't understand: You have references to wxWidgets gcc_lib (the static variant, no DLL -> a stand-alone executable) and gcc_dll (the dynamic, DLL variant). What are your project options? Do you want to use the wxWidgets DLL or do you want to link wxWidgets statically (no DLL required)? What did you chose initially for your project?
In addition: Please try to avoid to provide the libs you'd like to link with directly (with the path). Instead include the directory to the lib to the linker directories and just add "wxmsw26u" in your case.
With regards, Morten.

MortenMacFly:
Sorry, I should have read your first post, there you go:

--- Quote from: studsbr on June 16, 2006, 05:36:29 pm ---   
--- Code: (dos) ---mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
--- End code ---

4) In the code::block program, I created new project using "wxWidget Application"
   template named "teste" in the "C:\desenv\projetos" with the following options:
   "Using UNICODE static wxWidget library",  <- Because, I compiling the wxWidget using UNICODE=1

--- End quote ---
That's wrong. You compiled wxWidgets with SHARED=1 so you need to setup your project to use the shared variant (not static). The UNICODE=1 will trigger the "u" in the library "wxmsw26u". That your linkage did not work was because you were missing to add the "26" to the project options.
With regards, Morten.

Edit: BTW: I saw you are still using RC2. If you use one of the nightlies (see the nightlies forum) than you'll be provided with a very nice wizard that will guide you through the setup of a wxWidgets application and verifies you setup your project correctly.

studsbr:
Hi Morten,

I don´t believe. I´ve got it finally! :D
I tried to compile the wxWidgets-2.6.3 again without "SHARED=1" using:


--- Code: ---mingw32-make -f makefile.gcc BUILD=release UNICODE=1 MONOLITHIC=1
--- End code ---

After the wxWidgets compiling finished, I try to compile
my application again and I obtained many others error messages.
Poor me!  :(

However, after a long prayer, a light fall in me  :shock:. So,

a) I moved all my wxWidget directory (C:\desenv\wxWidgets-2.6.3)
    to root (C:\wxWidgets-2.6.3)
b) I created a new application using the wxWidget template with the
   options: "Using UNICODE static wxWidgets library" and "Use separete wxApp,
   wxFrames files"
c) I made "WX_DIR=C:\wxWidgets-2.6.3" and I changed the link library "wxmswu" to
   "wxmsw26u"
d) and so, I compiled this application.

 I did´t belive what I saw  8)

Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings

and the application run normally. :lol:

Here I finished.

Thanks a lot for your help, Morten.

With regards, Studsbr ":^)´

Navigation

[0] Message Index

[*] Previous page

Go to full version