Author Topic: Problem with linker  (Read 8108 times)

sNapik

  • Guest
Problem with linker
« on: July 20, 2007, 03:08:43 am »
Using new MinGW compiler I built wxWidgets accordint to tutorials found on wiki. Trying to compile a window made in wxSmith I got this message:

ld.exe             cannot find -lwxmsw28u

I searched forum and find some similar topics, but anything mentioned there didnt work. I am sure, that I have compiled wxWidgets into single dll. Browsing that older topisc I tryed various black magic with variables, but nothing happened. My dll has name wxmsw28u_gcc_custom.dll. Could somebody tell me what need change? I appreciate any help or descripsion how this linking works.

Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Problem with linker
« Reply #1 on: July 20, 2007, 04:02:22 am »
ld.exe             cannot find -lwxmsw28u

On the menu "Project" click "Build Options" then select the tab "Search directories", inside this tab is another one with the tab "Linker" here you should add the directory where the wxWidgets library's reside in.

Usually: C:\wxWidgets-2.8.0\lib and depending on your compilation the libraries are created in a folder like gcc or something like that inside the lib folder. Just browse this folders to find the libwxmsw28u.a or lib_wxmsw28u.a, a similar filename jeje. :) good luck.

You can define the global variable wx too.

sNapik

  • Guest
Re: Problem with linker
« Reply #2 on: July 20, 2007, 11:10:20 am »
Once this worked, but aplication didnt start corectly. Some error during initialization ocured. Then I opened new project a set everything same way like last time but got same mesage like yesterday. Only library has name lwxmsw28ud. Im realy confused now. I gues it was caused by checking use wx dll button, but this settin stay remembered when I overwrite project with another same name. Project with another name works again.
« Last Edit: July 20, 2007, 11:20:06 am by sNapik »

maxx.t

  • Guest
Re: Problem with linker
« Reply #3 on: July 20, 2007, 12:26:45 pm »
The d at the end of the lib name means that you are making a debug build of your program. Look at Project -> Build options. I guess that in the left pane you see your project with two targets, a release and a debug target. The necessary libraries for the targets can be seen in the tab Linker settings, The linker search path in the tab Search directories -> Linker. Please check whether the desired lib is in the path the linker is looking for.

Have you also build wxWidgets with option BUILD=debug?

sNapik

  • Guest
Re: Problem with linker
« Reply #4 on: July 20, 2007, 02:24:12 pm »
Thx.....It seem to compile well. But another problem occurred. Everithing is build and linked without any errors or warnings, but when trying to run aplication I get an error mesage and proces is terminated with this code:

Process terminated with status -1073741819 (0 minutes, 13 seconds)

Error mesage looks like this:


I dont know how is exact translation.....Something like: Corect initialization of the aplication (0xc0000005) failed.......

Could somebody help me? Is problem in CodeBlocks, wxWidgets or compiler?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Problem with linker
« Reply #5 on: July 20, 2007, 02:44:38 pm »
Did you copy wxmsw28u_gcc_custom.dll to the directory where your executable is?

sNapik

  • Guest
Re: Problem with linker
« Reply #6 on: July 20, 2007, 03:03:58 pm »
Yes... With missing .dll is diferent message.

maxx.t

  • Guest
Re: Problem with linker
« Reply #7 on: July 20, 2007, 04:54:53 pm »
Have you tried to start your program with the debugger in order to find what statement causes this error?

sNapik

  • Guest
Re: Problem with linker
« Reply #8 on: July 22, 2007, 12:17:10 pm »
It seems to be exactly in moment when aplication is launched. I got this error after first clicking on step into button.

sNapik

  • Guest
Re: Problem with linker
« Reply #9 on: July 22, 2007, 06:53:15 pm »
I made it working by checking Use wxdll buton in project creation wizard. Sorry for bothering you with my stupid mistake.

Offline 00061205

  • Multiple posting newcomer
  • *
  • Posts: 30
Re: Problem with linker
« Reply #10 on: July 26, 2008, 10:29:53 am »
I made it working by checking Use wxdll buton in project creation wizard. Sorry for bothering you with my stupid mistake.
I get this error mesage too.
Process terminated with status -1073741819 (0 minutes, 1 seconds)
How did you solved your problem?