Author Topic: wx Project templates for CVS?  (Read 4734 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
wx Project templates for CVS?
« on: February 20, 2005, 05:53:55 am »
Hi again! :)

I just managed to compile CVS (twice). But i got a problem.

My hello world doesn't compile...must have been garbled (either by me or by the program ^^;;; ) during project saving under new format.

Do you have functional "hello world" wxWidgets templates that I can compile successfully under CVS?

(Just in case, here's the log: )


Project   : wxWindows application
Compiler  : GNU GCC Compiler (called directly)
Directory : G:\projects\proyecto_wx\
--------------------------------------------------------------------------------
mingw32-g++.exe   -L"G:\\MINGW\\lib"  -o "wxWindows.exe"    -lstdc++ -lgcc -lgdi32 -lcomdlg32 -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw242 ".objs\\main.o"    
.objs\\main.o(.text+0x1f):main.cpp: undefined reference to `_imp___ZN9wxAppBase17CheckBuildOptionsERK14wxBuildOptions'
.objs\\main.o(.text+0x31):main.cpp: undefined reference to `_imp___ZN5wxAppC2Ev'
.objs\\main.o(.text+0x46):main.cpp: undefined reference to `_imp__wxTheApp'
.objs\\main.o(.text+0x63):main.cpp: undefined reference to `_imp___Z7wxEntryPvS_Pcib'
.objs\\main.o(.text+0x89):main.cpp: undefined reference to `_imp__wxFrameNameStr'
.objs\\main.o(.text+0x9e):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0xaa):main.cpp: undefined reference to `_imp___ZN11wxFrameBaseC2Ev'
.objs\\main.o(.text+0xaf):main.cpp: undefined reference to `_imp___ZTV7wxFrame'
.objs\\main.o(.text+0xc0):main.cpp: undefined reference to `_imp___ZN7wxFrame4InitEv'
.objs\\main.o(.text+0xce):main.cpp: undefined reference to `_imp__wxDefaultSize'
.objs\\main.o(.text+0xd4):main.cpp: undefined reference to `_imp__wxDefaultPosition'
.objs\\main.o(.text+0xe5):main.cpp: undefined reference to `_imp___ZN7wxFrame6CreateEP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_'
.objs\\main.o(.text+0x122):main.cpp: undefined reference to `_imp___ZN9wxMenuBarC1Ev'
.objs\\main.o(.text+0x13e):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0x153):main.cpp: undefined reference to `_imp___ZN12wxEvtHandlerC2Ev'
.objs\\main.o(.text+0x159):main.cpp: undefined reference to `_imp___ZTV10wxMenuBase'
.objs\\main.o(.text+0x173):main.cpp: undefined reference to `_imp__wxEmptyString'
.objs\\main.o(.text+0x18e):main.cpp: undefined reference to `_imp___ZTV8wxObject'
.objs\\main.o(.text+0x1a3):main.cpp: undefined reference to `_imp___ZTV10wxListBase'
.objs\\main.o(.text+0x1b2):main.cpp: undefined reference to `_imp___ZN10wxListBase4InitE9wxKeyType'
.objs\\main.o(.text+0x1c4):main.cpp: undefined reference to `_imp___ZN10wxMenuBase4InitEl'
.objs\\main.o(.text+0x1cb):main.cpp: undefined reference to `_imp___ZTV6wxMenu'
.objs\\main.o(.text+0x1da):main.cpp: undefined reference to `_imp___ZN18wxBaseArrayPtrVoidC2Ev'
.objs\\main.o(.text+0x1e3):main.cpp: undefined reference to `_imp___ZN6wxMenu4InitEv'
.objs\\main.o(.text+0x210):main.cpp: undefined reference to `_imp___Z11wxGetLocalev'
.objs\\main.o(.text+0x223):main.cpp: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\\main.o(.text+0x23d):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0x246):main.cpp: undefined reference to `_imp___Z11wxGetLocalev'
.objs\\main.o(.text+0x259):main.cpp: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\\main.o(.text+0x270):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0x289):main.cpp: undefined reference to `_imp___ZN14wxMenuItemBase3NewEP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\\main.o(.text+0x2d3):main.cpp: undefined reference to `_imp___Z11wxGetLocalev'
.objs\\main.o(.text+0x2e9):main.cpp: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\\main.o(.text+0x300):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0x34e):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0x363):main.cpp: undefined reference to `_imp___ZN12wxEvtHandlerC2Ev'
.objs\\main.o(.text+0x369):main.cpp: undefined reference to `_imp___ZTV10wxMenuBase'
.objs\\main.o(.text+0x383):main.cpp: undefined reference to `_imp__wxEmptyString'
.objs\\main.o(.text+0x39e):main.cpp: undefined reference to `_imp___ZTV8wxObject'
.objs\\main.o(.text+0x3b3):main.cpp: undefined reference to `_imp___ZTV10wxListBase'
.objs\\main.o(.text+0x3c2):main.cpp: undefined reference to `_imp___ZN10wxListBase4InitE9wxKeyType'
.objs\\main.o(.text+0x3d4):main.cpp: undefined reference to `_imp___ZN10wxMenuBase4InitEl'
.objs\\main.o(.text+0x3db):main.cpp: undefined reference to `_imp___ZTV6wxMenu'
.objs\\main.o(.text+0x3ea):main.cpp: undefined reference to `_imp___ZN18wxBaseArrayPtrVoidC2Ev'
.objs\\main.o(.text+0x3f3):main.cpp: undefined reference to `_imp___ZN6wxMenu4InitEv'
.objs\\main.o(.text+0x420):main.cpp: undefined reference to `_imp___Z11wxGetLocalev'
.objs\\main.o(.text+0x433):main.cpp: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\\main.o(.text+0x44d):main.cpp: undefined reference to `_imp___ZN8wxString8InitWithEPKcjj'
.objs\\main.o(.text+0x456):main.cpp: undefined reference to `_imp___Z11wxGetLocalev'
.objs\\main.o(.text+0x469):main.cpp: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
Process terminated with status 1 (0 minutes, 1 seconds)
50 errors, 0 warnings
 

Errors: 50. Warnings: 0. Wow, what a score. Must've been the heck of a game ;-)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
wx Project templates for CVS?
« Reply #1 on: February 20, 2005, 09:30:16 am »
Welcome to CVS version, which is always updated :)

Go to advanced compiler options and edit the command lines for executables and dlls. Remove the "$libs" macro and append it to the end of each of those three command lines...
Or go to global compiler options and press "Reset defaults" for you compiler.
Or start codeblocks with the command line parameter "--clear-configuration" (this will clear all configuration settings - just like fresh installation).

Take your pick ;)

Yiannis.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
wx Project templates for CVS?
« Reply #2 on: February 20, 2005, 09:34:26 am »
I researched more on this. Apparently it's a codeblocks bug. I made a parallel installation of beta5 vs. CVS, compiling the same project (with different names of course).

Here's the command line used by the compiler in CVS:

Project   : wxWindows application
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : G:\projects\cb_wx_1\
--------------------------------------------------------------------------------
mingw32-g++.exe -MM -Os -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -DWXUSINGDLL -MF .deps\\main.d -MT .objs\\main.o -IG:\\MINGW -IG:\\MINGW\\include -IG:\\MINGW\\include\\c++ -IG:\\MINGW\\include\\c++\\3.4.2\\mingw32  main.cpp
mingw32-g++.exe -Os -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -DWXUSINGDLL -IG:\\MINGW -IG:\\MINGW\\include -IG:\\MINGW\\include\\c++ -IG:\\MINGW\\include\\c++\\3.4.2\\mingw32  -c main.cpp -o .objs\\main.o
mingw32-g++.exe -LG:\\MINGW\\lib  -o G:\\projects\\cb_wx_1\\wxWindowsb5.exe  -lstdc++ -lgcc -lgdi32 -lcomdlg32 -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw242 .objs\\main.o
(at this point is that I get all the undefined references):
.objs\main.o(.text+0x1f):main.cpp: undefined reference to `_imp___ZN9wxAppBase17CheckBuildOptionsERK14wxBuildOptions'
...
...
...
.objs\main.o(.text+0x469):main.cpp: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
Process terminated with status 1 (0 minutes, 4 seconds)
50 errors, 0 warnings

----------------------------------------

And here's the same project used by beta 5:

Project   : wxWindows application
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : G:\projects\cb_wx_1\
--------------------------------------------------------------------------------
mingw32-g++.exe -MM -Os -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -DWXUSINGDLL -MF .deps/main.d -MT .objs/main.o -IG:/MINGW -IG:/MINGW/include -IG:/MINGW/include/c++ -IG:/MINGW/include/c++/3.4.2/mingw32  main.cpp
mingw32-g++.exe -Os -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ -DWXUSINGDLL -IG:/MINGW -IG:/MINGW/include -IG:/MINGW/include/c++ -IG:/MINGW/include/c++/3.4.2/mingw32  -c main.cpp -o .objs/main.o
mingw32-g++.exe  -o G:/projects/cb_wx_1/wxWindowsb5.exe -LG:/MINGW/lib  .objs/main.o    -lstdc++ -lgcc -lgdi32 -lcomdlg32 -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw242 -mwindows
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
 
I hope this helps debugging.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
I SOLVED IT!!!!
« Reply #3 on: February 20, 2005, 10:12:35 am »
I SOLVED IT!!!!

MENU: Settings... configure plugins... compiler... other... advanced options.

Choose: "Link object files to executable".

On CVS it is:
Code: [Select]
$linker $libdirs -o $exe_output $libs $link_objects $link_options
It should be:
Code: [Select]
$linker -o $exe_output $libdirs $link_objects $libs $link_options

I already compiled my hello world on CVS. It works fine this way. Don't ask me why, because I don't know. I just know it works. Actually, i'm not sure if we should change other lines.

ADDENDUM: Wow, Yiannis, you're fast.  When I posted my findings, i realized you had already solved it first  :oops: