Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: aindrajaya on September 26, 2016, 09:05:43 am

Title: cannot find -lcodeblocks, need your help please
Post by: aindrajaya on September 26, 2016, 09:05:43 am
-------------- Build: default in Materi C++ Percabangan (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -shared   -Wl,--dll -LC:\wxWidgets2.8\lib\\gcc_dll .objs\Materi.o .objs\Materi_C__.o  -o Materi_C__.dll -mthreads  -lwxmsw28u -lcodeblocks
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lcodeblocks
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

anyone can solve my problem ?  :'(
Title: Re: cannot find -lcodeblocks, need your help please
Post by: rlb on September 26, 2016, 12:18:26 pm
The real question seems to be, why are you linking against libcodeblocks in the first place? I can't find that file on my system, either. It's not linked against by default, either, at least not for the kind of programs I write. It might be needed for either a dll or a wxWidgets project, but in that case, it should be present - and it's not.
Find out where it's linked (it's probably in your project's build options) and ask yourself who put it there and why. And then try removing it - if the project compilers without it, problem solved.
Title: Re: cannot find -lcodeblocks, need your help please
Post by: aindrajaya on September 26, 2016, 05:43:54 pm
hanks for the reply.

I'm sorry not mention what I build, first.
I build a codeblocks plugin, and I think the default link libraries should be linking to libcodeblocks.
just like that..
Title: Re: cannot find -lcodeblocks, need your help please
Post by: oBFusCATed on September 26, 2016, 08:22:33 pm
You have to add a search directory for the linker to point where the libcodeblocks is on your hard disk.
Title: Re: cannot find -lcodeblocks, need your help please
Post by: aindrajaya on October 01, 2016, 04:51:26 am
oh thanks a lot for your advice  ;D