Author Topic: Problem Linking Gcc : A new wxwidget project  (Read 37312 times)

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« on: March 21, 2005, 07:53:59 pm »
I am new to wxwidget and  development  on framework  and gcc.

I try to create a new project under code block using the Menu > Project New Project , I select wxwidget program with static library and separate app and frame source code.

I try to compile without touching any code , it failed. I add it the wxwidget's include path in the compiler , and it successfully compiled.

But , the linking process fail.


The error msg is
mingw32-g++.exe   -L"C:\\MinGW\\lib"  -o "C:\\gui\\wxWindows.exe"   -L"C:\\MinGW\\lib"  ".objs\\main.o" ".objs\\app.o"     -lstdc++ -lgcc -lgdi32 -lcomdlg32 -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw242 -mwindows
C:\MinGW\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw242
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings


and later I found the wxmsw242.dll under CodeBlock's program  path , I added the CodeBlock's program path in the Link path , but now it give me another error.



Project   : wxWindows application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\gui\
--------------------------------------------------------------------------------
mingw32-g++.exe   -L"C:\\MinGW\\lib" -L"C:\\Program Files\\CodeBlocks"  -o "C:\\gui\\wxWindows.exe"   -L"C:\\MinGW\\lib" -L"C:\\Program Files\\CodeBlocks"  ".objs\\main.o" ".objs\\app.o"     -lstdc++ -lgcc -lgdi32 -lcomdlg32 -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmsw242 -mwindows
Info: resolving _wxFrameNameStr by linking to __imp__wxFrameNameStr (auto-import)
C:\\MinGW\\lib/libmingw32.a(main.o)(.text+0x97):main.c: undefined reference to `WinMain@16'
Info: resolving _wxDefaultSize by linking to __imp__wxDefaultSize (auto-import)
Info: resolving _wxDefaultPosition by linking to __imp__wxDefaultPosition (auto-import)
Info: resolving _wxEVT_COMMAND_MENU_SELECTED by linking to __imp__wxEVT_COMMAND_MENU_SELECTED (auto-import)
Info: resolving _wxEVT_NULL by linking to __imp__wxEVT_NULL (auto-import)
Info: resolving __ZN7wxFrame15sm_classwxFrameE by linking to __imp___ZN7wxFrame15sm_classwxFrameE (auto-import)
Info: resolving __ZN6wxMenu14sm_classwxMenuE by linking to __imp___ZN6wxMenu14sm_classwxMenuE (auto-import)
Info: resolving _wxEmptyString by linking to __imp__wxEmptyString (auto-import)
Info: resolving __ZN12wxEvtHandler20sm_classwxEvtHandlerE by linking to __imp___ZN12wxEvtHandler20sm_classwxEvtHandlerE (auto-import)
Info: resolving __ZN8wxObject16sm_classwxObjectE by linking to __imp___ZN8wxObject16sm_classwxObjectE (auto-import)
Info: resolving _wxTheApp by linking to __imp__wxTheApp (auto-import)
Info: resolving _wxTopLevelWindows by linking to __imp__wxTopLevelWindows (auto-import)
Info: resolving _wxNullIcon by linking to __imp__wxNullIcon (auto-import)
Info: resolving __ZN5wxApp13sm_classwxAppE by linking to __imp___ZN5wxApp13sm_classwxAppE (auto-import)
Info: resolving __ZN9wxAppBase11m_appInitFnE by linking to __imp___ZN9wxAppBase11m_appInitFnE (auto-import)
Info: resolving __ZN6wxIcon14sm_classwxIconE by linking to __imp___ZN6wxIcon14sm_classwxIconE (auto-import)
Info: resolving __ZN11wxGDIObject19sm_classwxGDIObjectE by linking to __imp___ZN11wxGDIObject19sm_classwxGDIObjectE (auto-import)
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings


This time I don't  know what had happened .
Anybody can help me ?

My platform : Windows 2000 Professinal
wx-widgets2.4.2

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #1 on: March 22, 2005, 01:56:46 am »
Later  I have tried to create a new wx-widget again , but this time I use wxwinget DLL instead of  static library.

I manage to compile and link the program but when I run , it shows me that  DLL not found. I then copied the wxmsw242.dll to the program path.
and run the program . But  this time , a windows error shows (like those messege shown whenever a program goes hair-wire).

I have tried my best , please help me , thanks.

I do not want to see my adventure to wxwidget  stops here ...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #2 on: March 22, 2005, 08:44:12 am »
Hi,

you need to have the wxWidgets development libraries and header files. I assume you don't, because you try to link with the dll. You have to link with a static library (in this case libwxmsw242.a).
You should download and build wxWidgets yourself. This will create the necessary files needed to build wxWidgets applications.
Maybe I 'll write a small article in the wiki about this process...

Don't give up :)
Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #3 on: March 22, 2005, 05:52:13 pm »
Thanks mandrav. I won't give up so easy  :D

I have the wxWidgets development libraries and header files, they are under c:\wxWindows-2.4.2 . However, I do not build them myself , I downloaded the  setup files and install , it should ok right ?

I try to link with DLL because from the following error message
C:\MinGW\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw242
 
I try to Find file with named "wxmsw242" and I can only get wxmsw242.dll .
The file you mentioned "libwxmsw242.a" is not exist , but I found that it there are 2 files named "libwxmsw.a" under c:\wxWindows-2.4.2\lib\release and c:\wxWindows-2.4.2\lib\debug respectively.

I believe this is the static library you mentioned. Therefore,  I have tried a series of effort.

1. I try to add c:\wxWindows-2.4.2\lib\release in my Link Dirs .
I try to link again , but the same message prompt.

2. I renamed the libwxmsw.a to wxmsw242.a , and try to link again.
     Same problem.

3. I renamed the libwxmsw.a to wxmsw242 , and try to link again.
     Same problem.

4. I renamed the libwxmsw.a to libwxmsw242.a , and try to link again.
     Same problem.

5.  I copy the libwxmsw.a to C:\WINNT , and repeat the rename and link steps , still cannot solve the problem.


Now , I cannot think of other way .

My compiler Dirs setting is
C:\MinGW\include
c:\wxWindows-2.4.2\include


My Linker dirs setting is
C:\MinGW\lib
C:\wxWindows-2.4.2\lib\release

Any settings I have left out ?

I have tested a few IDE for wx-widget and finally I choose Code::Block , because it is fast , stable and configurable .  I believe after solving this problem , I will start to step into the open source development environment that I have dreamt for a few years.

Quote
You should download and build wxWidgets yourself. This will create the necessary files needed to build wxWidgets applications.
Maybe I 'll write a small article in the wiki about this process...


After I solved this problem , I shall help to write a small article to help those who cannot make a new wxwidget project also :D

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #4 on: March 22, 2005, 06:08:47 pm »
Quote
The file you mentioned "libwxmsw242.a" is not exist , but I found that it there are 2 files named "libwxmsw.a" under c:\wxWindows-2.4.2\lib\release and c:\wxWindows-2.4.2\lib\debug respectively.

Add "c:\wxWindows-2.4.2\lib\release" to your linker dirs (or the debug version, whichever you prefer). Then, in the link libraries, edit the "wxmsw242" library and change it to "wxmsw".
That's all that's needed.

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

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #5 on: March 22, 2005, 06:43:54 pm »
Quote from: mandrav
Quote
The file you mentioned "libwxmsw242.a" is not exist , but I found that it there are 2 files named "libwxmsw.a" under c:\wxWindows-2.4.2\lib\release and c:\wxWindows-2.4.2\lib\debug respectively.

Add "c:\wxWindows-2.4.2\lib\release" to your linker dirs (or the debug version, whichever you prefer).
That's all that's needed.

HTH,
Yiannis.


I have added the c:\wxWindows-2.4.2\lib\release to my Linker Dirs .

Quote
Then, in the link libraries, edit the "wxmsw242" library and change it to "wxmsw".


Do you mean that I need to rename the file libwxmsw.a to wxmsw ?
But the error message shown that cannot find wxmsw242 ..
C:\MinGW\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw242

Anyway , I have tried to rename

 libwxmsw.a under  c:\wxWindows-2.4.2\lib\release
to
1. wxmsw
2. wxmsw242
3. wxmsw.a
4. wxmsw242.a

I still get the same error message ....  :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #6 on: March 22, 2005, 08:02:02 pm »
Quote
Do you mean that I need to rename the file libwxmsw.a to wxmsw ?

No...
In the project's (or target's) linker options page the dependency for wxmsw242 is listed. It's either in the form of "libwxmsw242.a" or "wxmsw242". Change this to "wxmsw"...

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

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #7 on: March 23, 2005, 07:46:19 pm »
Hi, thanks. I have changed the setting in the Build Options. And the linker manages to find the library . But now I face another linking problem .
"Undefined reference " , I try to look into the source code of app.cpp , and find the "InitCommonControl" function but I can't find. It seems like is a WINAPI .
   I have tried to recompile my wxwidgets but it still the same problem.
I have tried my best to solve , however, I have not much C++ debugging experience , it seems like out of my ability to solve this problem .

The following is my linking error

Quote
mingw32-g++.exe   -L"C:\\MinGW\\lib"  -L"..\\MinGW\\lib" -L"..\\wxWindows-2.4.2\\lib" -L"..\\wxWindows-2.4.2\\contrib\\lib" -o "wxwindows.exe"   -L"C:\\MinGW\\lib"  -L"..\\MinGW\\lib" -L"..\\wxWindows-2.4.2\\lib" -L"..\\wxWindows-2.4.2\\contrib\\lib" ".objs\\main.o"     -lstdc++ -lgcc -lgdi32 -lcomdlg32 -lodbc32 -lwsock32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid -lwxmswd -mwindows
..\\wxWindows-2.4.2\\lib/libwxmswd.a(app.o)(.text+0x61a): In function `ZN5wxApp10InitializeEv':
c:/wxwindows-2.4.2/src/msw/../../src/msw/app.cpp:235: undefined reference to `InitCommonControls@0'

..\\wxWindows-2.4.2\\lib/libwxmswd.a(app.o)(.text+0x624):c:/wxwindows-2.4.2/src/msw/../../src/msw/app.cpp:249: undefined reference to `OleInitialize@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(app.o)(.text+0x1160): In function `ZN5wxApp7CleanUpEv':

c:/wxwindows-2.4.2/src/msw/../../src/msw/app.cpp:561: undefined reference to `OleUninitialize@0'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(statbr95.o)(.text+0x215): In function `ZN11wxStatusBar6CreateEP8wxWindowilRK8wxString':
c:/wxwindows-2.4.2/src/msw/../../src/msw/statbr95.cpp:104: undefined reference to `CreateStatusWindowA@16'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(utils.o)(.text+0x10f): In function `Z17wxGetFullHostNamePci':
c:/wxwindows-2.4.2/src/msw/../../src/msw/utils.cpp:182: undefined reference to `WSAStartup@8'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(utils.o)(.text+0x140):c:/wxwindows-2.4.2/src/msw/../../src/msw/utils.cpp:186: undefined reference to `gethostname@8'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(utils.o)(.text+0x176):c:/wxwindows-2.4.2/src/msw/../../src/msw/utils.cpp:192: undefined reference to `gethostbyname@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(utils.o)(.text+0x19f):c:/wxwindows-2.4.2/src/msw/../../src/msw/utils.cpp:197: undefined reference to `gethostbyaddr@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(utils.o)(.text+0x1f8):c:/wxwindows-2.4.2/src/msw/../../src/msw/utils.cpp:207: undefined reference to `WSACleanup@0'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.text+0x998): In function `ZN12wxDropTarget8RegisterEm':
c:/wxwindows-2.4.2/src/msw/../../src/msw/ole/droptgt.cpp:330: undefined reference to `CoLockObjectExternal@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.text+0x9f2):c:/wxwindows-2.4.2/src/msw/../../src/msw/ole/droptgt.cpp:336: undefined reference to `RegisterDragDrop@8'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.text+0xa10):c:/wxwindows-2.4.2/src/msw/../../src/msw/ole/droptgt.cpp:338: undefined reference to `CoLockObjectExternal@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.text+0xa8d): In function `ZN12wxDropTarget6RevokeEm':
c:/wxwindows-2.4.2/src/msw/../../src/msw/ole/droptgt.cpp:352: undefined reference to `RevokeDragDrop@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.text+0xadc):c:/wxwindows-2.4.2/src/msw/../../src/msw/ole/droptgt.cpp:358: undefined reference to `CoLockObjectExternal@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.data+0x0): In function `ZN12wxDataFormataSERKS_':
c:/wxwindows-2.4.2/src/msw/../../include/wx/msw/ole/dataform.h: undefined reference to `IID_IUnknown'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(droptgt.o)(.data+0x4):c:/wxwindows-2.4.2/src/msw/../../include/wx/msw/ole/dataform.h: undefined reference to `IID_IDropTarget'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(spinbutt.o)(.text+0x2e1): In function `ZN12wxSpinButton6CreateEP8wxWindowiRK7wxPointRK6wxSizelRK8wxString':
c:/wxwindows-2.4.2/src/msw/../../src/msw/spinbutt.cpp:122: undefined reference to `CreateUpDownControl@48'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x177): In function `ZN11wxImageList6CreateEiibi':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:99: undefined reference to `ImageList_Create@20'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x200): In function `ZN11wxImageListD2Ev':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:113: undefined reference to `ImageList_Destroy@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x25e): In function `ZN11wxImageListD1Ev':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:113: undefined reference to `ImageList_Destroy@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x2bc): In function `ZN11wxImageListD0Ev':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:113: undefined reference to `ImageList_Destroy@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x354): In function `ZNK11wxImageList13GetImageCountEv':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:127: undefined reference to `ImageList_GetImageCount@4'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x3a3): In function `ZNK11wxImageList7GetSizeEiRiS0_':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:135: undefined reference to `ImageList_GetIconSize@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x440): In function `ZN11wxImageList3AddERK8wxBitmapS2_':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:149: undefined reference to `ImageList_Add@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x4aa): In function `ZN11wxImageList3AddERK8wxBitmapRK8wxColour':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:169: undefined reference to `ImageList_AddMasked@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x4f9): In function `ZN11wxImageList3AddERK6wxIcon':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:184: undefined reference to `ImageList_ReplaceIcon@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x56e): In function `ZN11wxImageList7ReplaceEiRK8wxBitmapS2_':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:205: undefined reference to `ImageList_Replace@16'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x616): In function `ZN11wxImageList7ReplaceEiRK6wxIcon':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:221: undefined reference to `ImageList_ReplaceIcon@12'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x69f): In function `ZN11wxImageList6RemoveEi':
c:/wxwindows-2.4.2/src/msw/../../src/msw/imaglist.cpp:237: undefined reference to `ImageList_Remove@8'
..\\wxWindows-2.4.2\\lib/libwxmswd.a(imaglist.o)(.text+0x712): In function `ZN11wxImageList9RemoveAllEv':
Process terminated with status 1 (0 minutes, 55 seconds)
29 errors, 0 warnings

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #8 on: March 26, 2005, 02:35:53 pm »
Hi.

I had the same problem as you but I managed to solve it :) Here is how!

The main problem is that the linker doesn't find some librairies it needs in order to link your project.

Usually, when you're linking a wxWidgets app, you need to add this options to the linker (theses options are depending of which wx functions and classes you use, so you perhaps need to add some):
-lwinspool
-lwinmm -lshell32 -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 -lodbc32
-lwsock32 -lopengl32 -lglu32 -lole32 -loleaut32 -luuid

I tried to add this in the "linker options" control (right click on your project, "Build Options"->"Linker options"), but this didn't work.

Instead, add manually the libraires in the "link librairies" box at the left (right click on your project, "Build Options"->"Linker options"). Click on "Add" and go to "C:\Program Files\CodeBlocks\lib" directory (assuming you did a standard installation).

Here there is a lot of files whose name is starting by "lib". Select for exemple libwinspool.a (which corresponds to "-lwinspool" in the command line). Click on ok. Now you can edit the full path of the librairy.
THERE IS A BUG IN CODE::BLOCK 1.0beta6: if there is a space in the name of a librairy, the command line is misinterpreted!!!! (please developpers, add " ou ' before and after each name!!)
So we need to act like 10 years ago: change "Program Files" by "Progra~1". Click finally on ok.

You need to do this for all the librairies you need (sorry). If uyou have undefined symbols, do a search on google: it will give you (generally) the MSDN page corresponding to the function. Here you can find which librairy you need to link.

Evan Meakyl

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #9 on: March 29, 2005, 06:58:08 am »
hi , thank you very much, finally I manage to compile and run my program properly.

Even though I follow your method to add the linker options , I still face a problem when running the output execute file.

It gives me some error telling me that the library version is different (debug) kind of message. However, later I solve it myself by linking to the non-debug version of libmsw library.

I am very happy because I manage to start my wx-widgets framework programming life .. hurray

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #10 on: April 02, 2005, 04:46:55 am »
I am trying to link the "minimal" application with Code::Blocks and am receiving 40 undefined reference errors (listed below). Using MSYS and MinGW I compiled the "minimal" sample successfully, so I figured it had to be a problem with the way I have Code::Blocks setup.

Here are the steps I have taken:
Download
-----------
Download wxWidgets 2.5.3 source
Download Code::Blocks installer
Download MinGW installer
Download MSYS installer

Install
-------
Install MinGW
Install MSYS
Install Code::Blocks

Compile
---------
$ mkdir /c/Programs/wxWidgets-2.5.3/msw-release
$ cd /c/Programs/wxWidgets-2.5.3/msw-release
$ ../configure --disable-shared --disable-debug --enable-unicode --disable-universal --enable-monolithic --enable-use_gui --enable-use_opengl --enable-use_html --enable-use_xrc --enable-runtime_libs
$ make
$ cp C:\Programs\wxWidgets-2.5.4\msw-release\lib\wx\include\msw-unicode-release-static-2.5\wx\setup.h C:\Programs\wxWidgets-2.5.4\include\wx\
$ make install
NOTE: "make install" FAILED WITH ERROR 34; but the next steps still worked so I ignored it
$ cd ../samples/minimal
$ make && minimal.exe

After a short compile process the minimal application popped up fully functional (1 window, 2 menus, and an about dialog)

Code::Blocks
---------------
Created a new Code::Blocks wxWidgets project folder.
Copied minimal.cpp into the project folder.
Created a new Code::Blocks wxWidget application using a statically linked library.
Removed main.cpp from the project.
Added minimal.cpp to the project.
Project->Build options->Compiler dirs: C:\Programs\wxWidgets-2.5.4\include
Project->Build options->Linker dirs: C:\Programs\wxWidgets-2.5.4\msw-release\lib
Project->Build options->Linker options->Link libraries->Edit: wx_mswu-2.5 (from C:\Programs\wxWidgets-2.5.4\msw-release\lib\libwx_mswu-2.5.a)
Compile->Compile

Output
--------
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : U:\Programming\wxWidgetsStaticLibraryTest\
--------------------------------------------------------------------------------
Linking executable: U:\Programming\wxWidgetsStaticLibraryTest\wxWidgetsStaticLIbraryTest.exe
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_app.o)(.text+0x8b9):app.cpp: undefined reference to `InitCommonControls@0'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_app.o)(.text+0x8c3):app.cpp: undefined reference to `OleInitialize@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_app.o)(.text+0xbfc):app.cpp: undefined reference to `OleUninitialize@0'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_window.o)(.text+0x8aa7):window.cpp: undefined reference to `_TrackMouseEvent@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_statbr95.o)(.text+0x1a4):statbr95.cpp: undefined reference to `CreateStatusWindowW@16'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_filename.o)(.text+0x40d1):filename.cpp: undefined reference to `CoCreateInstance@20'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_filename.o)(.text+0x40f7):filename.cpp: undefined reference to `IID_IPersistFile'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x745):droptgt.cpp: undefined reference to `CoLockObjectExternal@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x758):droptgt.cpp: undefined reference to `RegisterDragDrop@8'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x780):droptgt.cpp: undefined reference to `CoLockObjectExternal@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x79f):droptgt.cpp: undefined reference to `RevokeDragDrop@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x7ae):droptgt.cpp: undefined reference to `CoLockObjectExternal@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.data+0x0):droptgt.cpp: undefined reference to `IID_IUnknown'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.data+0x4):droptgt.cpp: undefined reference to `IID_IDropTarget'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_spinbutt.o)(.text+0x32e):spinbutt.cpp: undefined reference to `CreateUpDownControl@48'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x13d):imaglist.cpp: undefined reference to `ImageList_Create@20'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x1c5):imaglist.cpp: undefined reference to `ImageList_Destroy@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x215):imaglist.cpp: undefined reference to `ImageList_Destroy@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x26a):imaglist.cpp: undefined reference to `ImageList_Destroy@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x28e):imaglist.cpp: undefined reference to `ImageList_GetImageCount@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x2b6):imaglist.cpp: undefined reference to `ImageList_GetIconSize@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x370):imaglist.cpp: undefined reference to `ImageList_Add@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x3fb):imaglist.cpp: undefined reference to `ImageList_AddMasked@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x460):imaglist.cpp: undefined reference to `ImageList_ReplaceIcon@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x4e3):imaglist.cpp: undefined reference to `ImageList_Replace@16'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x532):imaglist.cpp: undefined reference to `ImageList_ReplaceIcon@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x562):imaglist.cpp: undefined reference to `ImageList_Remove@8'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x590):imaglist.cpp: undefined reference to `ImageList_GetImageCount@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x5fd):imaglist.cpp: undefined reference to `ImageList_SetBkColor@8'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x63d):imaglist.cpp: undefined reference to `ImageList_Draw@24'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1139):clipbrd.cpp: undefined reference to `OleSetClipboard@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1156):clipbrd.cpp: undefined reference to `OleFlushClipboard@0'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1246):clipbrd.cpp: undefined reference to `OleSetClipboard@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x13a5):clipbrd.cpp: undefined reference to `OleGetClipboard@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1562):clipbrd.cpp: undefined reference to `ReleaseStgMedium@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.text+0xddd):dataobj.cpp: undefined reference to `ReleaseStgMedium@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0x0):dataobj.cpp: undefined reference to `IID_IUnknown'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0x4):dataobj.cpp: undefined reference to `IID_IEnumFORMATETC'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0x8):dataobj.cpp: undefined reference to `IID_IUnknown'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0xc):dataobj.cpp: undefined reference to `IID_IDataObject'
Process terminated with status 1 (0 minutes, 2 seconds)
40 errors, 0 warnings

HELP!
-------
I have been working this for 3 days and still haven't figured out how to compile a statically linked wxWidgets application. :( I have also tried with the release version to no avail.  To top it off, I need to get SQLite working with it all on top of everything else, I am only praying that goes smoother. :(

Micah

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #11 on: April 02, 2005, 04:54:15 am »
I just thought of adding this. It is a working Makefile for compiling the minimal sample. If I can get Code::Blocks to do everything in this Makefile it should work like a charm... only problem is I don't know how to do that. :p

Code
# =========================================================================
#     This makefile was generated by
#     Bakefile 0.1.7 (http://bakefile.sourceforge.net)
#     Do not modify, all changes will be overwritten!
# =========================================================================




prefix = /usr/local
exec_prefix = ${prefix}
INSTALL = /bin/install -c
EXEEXT = .exe
RESCOMP = windres
SETFILE =
NM = nm
srcdir = ../../../samples/minimal
top_srcdir = ../../..
top_builddir = ../../
LDFLAGS_GUI = -mwindows
CXX = g++
CXXFLAGS = -O2 -mthreads -Wall -Wno-ctor-dtor-privacy
CPPFLAGS =  -DNO_GCC_PRAGMA -I${top_builddir}lib/wx/include/msw-unicode-release-static-2.5 -I${top_srcdir}/include
LDFLAGS =  -mthreads
WX_LIB_FLAVOUR =
TOOLKIT = MSW
TOOLKIT_LOWERCASE = msw
TOOLKIT_VERSION =
TOOLCHAIN_NAME = mswu-2.5
EXTRALIBS =  -mthreads  -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32
EXTRALIBS_GUI =
HOST_SUFFIX =
SAMPLES_RPATH_FLAG =
SAMPLES_RPATH_POSTLINK =

### Variables: ###

DESTDIR =
WX_RELEASE = 2.5
WX_VERSION = $(WX_RELEASE).4
LIBDIRNAME = $(top_builddir)lib
MINIMAL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) -I$(srcdir) \
$(__DLLFLAG_p) -I$(srcdir)/../../samples $(CPPFLAGS) $(CXXFLAGS)
MINIMAL_OBJECTS =  \
$(__minimal___win32rc) \
$(__minimal_os2_lib_res) \
minimal_minimal.o

### Conditionally set variables: ###

#CXXC = $(CXX)
CXXC = $(top_builddir)./bk-deps $(CXX)
#PORTNAME = base
PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
#WXBASEPORT = _carbon
#WXDEBUGFLAG = d
#WXDEBUGFLAG = d
WXUNICODEFLAG = u
#WXUNIVNAME = univ
#EXTRALIBS_FOR_BASE = $(EXTRALIBS)
EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
#EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
EXTRALIBS_FOR_GUI =
#__minimal___mac_setfilecmd = \
# $(SETFILE) -a C minimal$(EXEEXT)
#__minimal___mac_rezcmd = $(__MACOSX_RESOURCES_p_1)
#__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
#__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__
#__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__
#__DLLFLAG_p = -DWXUSINGDLL
#__DLLFLAG_p_1 = -d WXUSINGDLL
#__DLLFLAG_p_2 = --define WXUSINGDLL
COND_PLATFORM_OS2_1___minimal___os2_emxbindcmd = $(NM) minimal$(EXEEXT) | if \
grep -q pmwin.763 ; then emxbind -ep minimal$(EXEEXT) ; fi
#__minimal___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___minimal___os2_emxbindcmd)
__minimal___win32rc = minimal_sample_rc.o
#__minimal_os2_lib_res = \
# $(top_srcdir)/include/wx/os2/wx.res
#__minimal_bundle___depname = minimal_bundle
#____minimal_BUNDLE_TGT_REF_DEP = \
# minimal.app/Contents/PkgInfo
#____minimal_BUNDLE_TGT_REF_DEP = \
# minimal.app/Contents/PkgInfo
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
#__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
#__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
__LIB_TIFF_p \
= \
-lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_JPEG_p \
= \
-lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_PNG_p \
= \
-lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_ZLIB_p = \
-lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
#__LIB_ODBC_p = \
# -lwxodbc$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
-lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_REGEX_p = $(COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p)
__LIB_EXPAT_p = \
-lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \
__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -i \
$(srcdir)/../../samples -i $(top_srcdir)/include -o minimal$(EXEEXT) Carbon.r \
$(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).4.r sample.r
#__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1)

### Targets: ###

all: minimal$(EXEEXT) $(__minimal_bundle___depname)

install: all

uninstall:

install-strip: install

clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f minimal$(EXEEXT)
rm -rf minimal.app

distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile

minimal$(EXEEXT): $(MINIMAL_OBJECTS) $(__minimal___win32rc)
$(CXX) -o $@ $(MINIMAL_OBJECTS) $(LDFLAGS)   -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_FOR_GUI)
$(__minimal___mac_rezcmd)
$(__minimal___mac_setfilecmd)
$(__minimal___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)

minimal.app/Contents/PkgInfo: minimal$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).4.rsrc $(top_srcdir)/src/mac/carbon/wxmac.icns
mkdir -p minimal.app/Contents
mkdir -p minimal.app/Contents/MacOS
mkdir -p minimal.app/Contents/Resources


sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/minimal/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/carbon/Info.plist.in >minimal.app/Contents/Info.plist


echo -n "APPL????" >minimal.app/Contents/PkgInfo


ln -f minimal$(EXEEXT) minimal.app/Contents/MacOS/minimal


cp -f $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).4.rsrc minimal.app/Contents/Resources/minimal.rsrc
cp -f $(top_srcdir)/src/mac/carbon/wxmac.icns minimal.app/Contents/Resources/wxmac.icns

#minimal_bundle: $(____minimal_BUNDLE_TGT_REF_DEP)

minimal_sample_rc.o: $(srcdir)/../../samples/sample.rc
$(RESCOMP) -i$< -o$@   --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2)   --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../samples --include-dir $(top_srcdir)/include

minimal_minimal.o: $(srcdir)/minimal.cpp
$(CXXC) -c -o $@ $(MINIMAL_CXXFLAGS) $(srcdir)/minimal.cpp


# Include dependency info, if present:
-include .deps/*.d

.PHONY: all install uninstall clean distclean minimal_bundle

Micah

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #12 on: April 02, 2005, 07:32:16 am »
Yay! I got it. :)

Project->Options->Build options->Linker options->Link libraries
Added the following:
Code
rpcrt4
oleaut32
ole32
uuid
winspool
winmm
shell32
comctl32
comdlg32
ctl3d32
advapi32
wsock32
gdi32


I am guessing that is a list of all the libraries wxWidgets used when initially being built (pulled from the Makefile), so I am going to add them to my default compiler options, that way they are available for all future projects.

Thanks for everyone's help! ;)

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #13 on: April 03, 2005, 10:06:44 pm »
Hi all, I face the similar problem after uninstalling older version and install the beta 6.0 . But this time,the linker error message seems like related to wxwidgets

Quote

C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x1b):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x41):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x49):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x94):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x2f3):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x30f):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x335):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x33d):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x388):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x5e7):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x608):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x63c):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x670):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x6a3):main.cpp: undefined reference to `wxWindowBase::Close(bool)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x725):main.cpp: undefined reference to `wxMessageBox(wxString const&, wxString const&, long, wxWindow*, int, int)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x75d):main.cpp: undefined reference to `wxNewId()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x776):main.cpp: undefined reference to `wxNewId()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x7cc):main.cpp: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x80a):main.cpp: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x847):main.cpp: undefined reference to `wxEVT_NULL'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata+0x0):main.cpp: undefined reference to `wxFrame::sm_eventTable'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBase6AppendEiRK8wxStringS2_10wxItemKind[wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)]+0x31):main.cpp: undefined reference to `wxMenuItemBase::New(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x7):main.cpp: undefined reference to `wxGetLocale()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2a):main.cpp: undefined reference to `wxLocale::GetString(char const*, char const*) const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x24):main.cpp: undefined reference to `vtable for wxMenu'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x3d):main.cpp: undefined reference to `wxMenu::Init()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN18wxAcceleratorArrayC1Ev[wxAcceleratorArray::wxAcceleratorArray()]+0xd):main.cpp: undefined reference to `wxBaseArrayPtrVoid::wxBaseArrayPtrVoid()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0xd):main.cpp: undefined reference to `wxEvtHandler::wxEvtHandler()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x16):main.cpp: undefined reference to `vtable for wxMenuBase'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x53):main.cpp: undefined reference to `wxMenuBase::Init(long)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxListBaseC2E9wxKeyType[wxListBase::wxListBase(wxKeyType)]+0x16):main.cpp: undefined reference to `vtable for wxListBase'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxListBaseC2E9wxKeyType[wxListBase::wxListBase(wxKeyType)]+0x28):main.cpp: undefined reference to `wxListBase::Init(wxKeyType)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxObjectC2Ev[wxObject::wxObject()]+0x8):main.cpp: undefined reference to `vtable for wxObject'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxString4InitEv[wxString::Init()]+0x7):main.cpp: undefined reference to `wxEmptyString'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0xd):main.cpp: undefined reference to `wxFrameBase::wxFrameBase()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x16):main.cpp: undefined reference to `vtable for wxFrame'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x21):main.cpp: undefined reference to `wxFrame::Init()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x5d):main.cpp: undefined reference to `wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxStringC1EPKcj[wxString::wxString(char const*, unsigned int)]+0x2c):main.cpp: undefined reference to `wxString::InitWith(char const*, unsigned int, unsigned int)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x14):main.cpp: undefined reference to `wxObject::CreateRefData() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x18):main.cpp: undefined reference to `wxObject::CloneRefData(wxObjectRefData const*) const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x1c):main.cpp: undefined reference to `wxEvtHandler::ProcessEvent(wxEvent&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x20):main.cpp: undefined reference to `wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x28):main.cpp: undefined reference to `wxEvtHandler::DoSetClientObject(wxClientData*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x2c):main.cpp: undefined reference to `wxEvtHandler::DoGetClientObject() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x30):main.cpp: undefined reference to `wxEvtHandler::DoSetClientData(void*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x34):main.cpp: undefined reference to `wxEvtHandler::DoGetClientData() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x38):main.cpp: undefined reference to `wxTopLevelWindowBase::Destroy()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x3c):main.cpp: undefined reference to `wxWindow::SetTitle(wxString const&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x40):main.cpp: undefined reference to `wxWindow::GetTitle() const'


I have all the same settings as before, the only different is , I do not have C:\program files\CodeBlocks as my Linker Dir  because I could not find this directory in this new version.

I suppose it should be the linking problem with wxwidgets.

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #14 on: April 03, 2005, 11:40:29 pm »
MDR, I give up some weeks ago.
wx-widget are not trivial to build.
if anyone have build wx-widget dynamic & static libraries on windows with ms-toolkit 2003, please give me a url.

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #15 on: April 04, 2005, 03:29:46 am »
Hi all, I face the similar problem after uninstalling older version and install the beta 6.0 . But this time,the linker error message seems like related to wxwidgets

Quote

C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x1b):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x41):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x49):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x94):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x2f3):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x30f):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x335):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x33d):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x388):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x5e7):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x608):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x63c):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x670):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x6a3):main.cpp: undefined reference to `wxWindowBase::Close(bool)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x725):main.cpp: undefined reference to `wxMessageBox(wxString const&, wxString const&, long, wxWindow*, int, int)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x75d):main.cpp: undefined reference to `wxNewId()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x776):main.cpp: undefined reference to `wxNewId()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x7cc):main.cpp: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x80a):main.cpp: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x847):main.cpp: undefined reference to `wxEVT_NULL'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata+0x0):main.cpp: undefined reference to `wxFrame::sm_eventTable'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBase6AppendEiRK8wxStringS2_10wxItemKind[wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)]+0x31):main.cpp: undefined reference to `wxMenuItemBase::New(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x7):main.cpp: undefined reference to `wxGetLocale()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2a):main.cpp: undefined reference to `wxLocale::GetString(char const*, char const*) const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x24):main.cpp: undefined reference to `vtable for wxMenu'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x3d):main.cpp: undefined reference to `wxMenu::Init()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN18wxAcceleratorArrayC1Ev[wxAcceleratorArray::wxAcceleratorArray()]+0xd):main.cpp: undefined reference to `wxBaseArrayPtrVoid::wxBaseArrayPtrVoid()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0xd):main.cpp: undefined reference to `wxEvtHandler::wxEvtHandler()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x16):main.cpp: undefined reference to `vtable for wxMenuBase'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x53):main.cpp: undefined reference to `wxMenuBase::Init(long)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxListBaseC2E9wxKeyType[wxListBase::wxListBase(wxKeyType)]+0x16):main.cpp: undefined reference to `vtable for wxListBase'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxListBaseC2E9wxKeyType[wxListBase::wxListBase(wxKeyType)]+0x28):main.cpp: undefined reference to `wxListBase::Init(wxKeyType)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxObjectC2Ev[wxObject::wxObject()]+0x8):main.cpp: undefined reference to `vtable for wxObject'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxString4InitEv[wxString::Init()]+0x7):main.cpp: undefined reference to `wxEmptyString'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0xd):main.cpp: undefined reference to `wxFrameBase::wxFrameBase()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x16):main.cpp: undefined reference to `vtable for wxFrame'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x21):main.cpp: undefined reference to `wxFrame::Init()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x5d):main.cpp: undefined reference to `wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxStringC1EPKcj[wxString::wxString(char const*, unsigned int)]+0x2c):main.cpp: undefined reference to `wxString::InitWith(char const*, unsigned int, unsigned int)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x14):main.cpp: undefined reference to `wxObject::CreateRefData() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x18):main.cpp: undefined reference to `wxObject::CloneRefData(wxObjectRefData const*) const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x1c):main.cpp: undefined reference to `wxEvtHandler::ProcessEvent(wxEvent&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x20):main.cpp: undefined reference to `wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x28):main.cpp: undefined reference to `wxEvtHandler::DoSetClientObject(wxClientData*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x2c):main.cpp: undefined reference to `wxEvtHandler::DoGetClientObject() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x30):main.cpp: undefined reference to `wxEvtHandler::DoSetClientData(void*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x34):main.cpp: undefined reference to `wxEvtHandler::DoGetClientData() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x38):main.cpp: undefined reference to `wxTopLevelWindowBase::Destroy()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x3c):main.cpp: undefined reference to `wxWindow::SetTitle(wxString const&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x40):main.cpp: undefined reference to `wxWindow::GetTitle() const'


I have all the same settings as before, the only different is , I do not have C:\program files\CodeBlocks\lib as my Linker Dir  because I could not find this directory in this new version.

I suppose it should be the linking problem with wxwidgets.

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #16 on: April 05, 2005, 07:03:52 pm »
Anybody have the idea ?  I have tried a few way , even the I copy the configuration from an older version , the same problem occur .

I wonder is the bugs of beta6 or not , it seems like cannot link to the wxmsd  library.

I just manage to solve the link problem but after upgrading code block, another link problem arise.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #17 on: April 05, 2005, 07:48:07 pm »
Have you tried re-building? Older object files may lurk there and fail linking.
Also, have you added the necessary link libraries in the project's build options? Note that the order the libraries appear, matters...
Post the *full* compile log if you want someone to help you. To enable full logging, go to "Settings/Configure plugins/Compiler", switch to the "Other" tab and select full logging.

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

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #18 on: April 06, 2005, 05:55:26 am »
thank yiannis.
I hv tried re-build it give the same result
Quote

C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x1b):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x41):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x49):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x94):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x2f3):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x30f):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x335):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x33d):main.cpp: undefined reference to `wxDefaultPosition'
....

Anyway , I just manage to solve the problem by uninstalling (with remove old configuration) and reinstall code-block


FYI, I have tried to uninstall (without removing old configuration) and reinstall but cannot solve this problem.

I suspect any of the old settings / file in c:\program files\codeblock cause this problem.

Anyway , hurray again .. I am on the way again ... yeah ..

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #19 on: April 06, 2005, 09:10:54 am »
That's why I asked you for your full compile log. The compiler commands have changed in beta6 and you needed to remove the beta5 configuration first. I know I should make a note of it somewhere...

Just for anyone else reading this, there is no need to uninstall codeblocks just to clear its configuration. You can launch codeblocks once with the command line argument "--clear-configuration". It does exactly the same.

Anyway, I 'm glad you got it working.

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

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #20 on: April 11, 2005, 08:36:39 pm »
Quote from: mandrav
That's why I asked you for your full compile log. The compiler commands have changed in beta6 and you needed to remove the beta5 configuration first. I know I should make a note of it somewhere...

Just for anyone else reading this, there is no need to uninstall codeblocks just to clear its configuration. You can launch codeblocks once with the command line argument "--clear-configuration". It does exactly the same.

Anyway, I 'm glad you got it working.

Yiannis.


Thanks. Sorry for not putting the full compile log  ..
I have tried the --clear-configuration in another PC , it works .

Thanks again ..

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #21 on: April 18, 2005, 04:13:50 pm »
there is an easy way to build wxWidgets programs on windows:
1/ install Devcpp 4992 :)
2/ use its webupdate to get all files that wxWidgets needs.
3/ create a wxWidgets in C:Bs, and set compiler/linker directorys to c:\dev-cpp\include and c:\dev-cpp\lib
4/ dont forget set linker options: wxmsw, uuid, ole32, wsock32, oleaut32, comctl32, advapi32, glu32, winspool,
    winmm, odbc32, ctl3d32 (there may be something not use)

it's my way to build wxWidget, hope it helps you.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Problem Linking Gcc : A new wxwidget project
« Reply #22 on: April 18, 2005, 09:32:30 pm »
Well, with the upcoming 1.0 Beta 7.1, there won't be a need to edit the libarires manually. I just modified the wxWindows template to do so ;-)

Now regarding the devpacks um...  well...  :roll: We have to work on that.