Author Topic: CodeBlocks Linux & wxWidgets : linking problems [SOLVED]  (Read 4711 times)

kayamel

  • Guest
CodeBlocks Linux & wxWidgets : linking problems [SOLVED]
« on: August 06, 2007, 12:09:36 pm »
Hi,

After compiling wxWidgets with a default config,  I installed  CB following the tutorial on linux on the CB wiki. I then did a test to compile a wxWidgets project by following what is told on the wiki of wxWidgets (adding `wx-config --cflags` under "Compiler settings"  and `wx-config --libs` under the Linker settings.

 I had the following error : 
Code
 cannot find -l-L/usr/local/lib -pthread   /usr/local/lib/libwx_gtk2-2.8

I then recompiled wxWidgets with monolithic, disable shared, enable ansi, and again had :

Code
cannot find -l-L/usr/local/lib -pthread   /usr/local/lib/libwx_gtk2-2.8.a -pthread -L/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm 
-lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lrt -lglib-2.0 -lXinerama -lpng -lz -ljpeg -ltiff -lwxregexu-2.8 -lwxexpat-2.8 -lz -ldl -lm

I tried rebuilding CB with non effects.

CB : nightly build from svn
Fedora 7
wxWidgets 2.8.4

Thanks
« Last Edit: August 06, 2007, 12:34:51 pm by kayamel »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: CodeBlocks Linux & wxWidgets : linking problems
« Reply #1 on: August 06, 2007, 12:17:36 pm »
I then did a test to compile a wxWidgets project by following what is told on the wiki of wxWidgets (adding `wx-config --cflags` under "Compiler settings"  and `wx-config --libs` under the Linker settings.

I believe you've added that command, `wx-config --libs` , in Link libraries section, which causing this error. Remove it and add it in Other linker options section.

Also give Code::Blocks' wxWidgets wizard a try. You won't have to do these things manually. ;)
Be a part of the solution, not a part of the problem.

kayamel

  • Guest
Re: CodeBlocks Linux & wxWidgets : linking problems
« Reply #2 on: August 06, 2007, 12:34:23 pm »
Oh dear me. Thank you. That was it. Spent whole friday over that.
Just can't understand how I missed that when it is clearly mentionned in the wiki.  :shock:

Thanks a bunch. That made my whole week I guess...