Author Topic: error unrecognized option '-plugin'  (Read 944 times)

Offline 37712

  • Single posting newcomer
  • *
  • Posts: 5
error unrecognized option '-plugin'
« on: June 14, 2018, 02:38:00 am »
Hi, I installed code blocks IDE and everything was running without a problem until yesterday. when ever I try to compile my c code I get an error message.

this is my build messages:

=== Build: Release in LinkedList (compiler: GNU GCC Compiler) ===
ld.exe    unrecognized option '-plugin'
             error: ld returned 1 exit status
=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===


this is my build log:

-------------- Clean: Release in LinkedListAssignment (compiler: GNU GCC Compiler)---------------

Cleaned "LinkedListAssignment - Release"

-------------- Build: Release in LinkedListAssignment (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall -std=c99 -O2 -std=c99  -c "C:\Users\37712\Google Drive\C Projects\CodeBlocks Projects\LinkedListAssignment\LinkedListAssignment.c" -o obj\Release\LinkedListAssignment.o
mingw32-g++.exe  -o bin\Release\LinkedListAssignment.exe obj\Release\LinkedListAssignment.o  -s 
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: unrecognized option '-plugin'
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

I am no sure but I think the problem started when I clicked on the CppCheck in the plugin which also gave me some kind of error message about failure to launch. please help I don't know what to do =(

I am using windows 7
« Last Edit: June 14, 2018, 08:50:10 am by 37712 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6367
    • My Best Post
Re: error unrecognized option '-plugin'
« Reply #1 on: June 14, 2018, 04:32:43 am »
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(general)#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

Edit: The above link gets you close to the linker settings that need checked.

Remove the option that was added in error.

Likely in other linker settings might be called extra linker settings.

Tim S.
« Last Edit: June 14, 2018, 04:35:53 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline 37712

  • Single posting newcomer
  • *
  • Posts: 5
Re: error unrecognized option '-plugin'
« Reply #2 on: June 14, 2018, 05:17:32 am »
hello, I followed your link and did the instructions about "compile a project using some non-standard libraries" that you sent me but I don't have any instructions there to modify I simply have a blank page to add instructions not modify, I have pretty much a clean install of code blocks and I still haven't been able to fix the problem. global compiler setting>search directories is all empty.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11275
    • Travis build status
Re: error unrecognized option '-plugin'
« Reply #3 on: June 14, 2018, 07:36:17 am »
Can you post the full rebuild log?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline 37712

  • Single posting newcomer
  • *
  • Posts: 5
Re: error unrecognized option '-plugin'
« Reply #4 on: June 14, 2018, 08:21:09 am »
not sure what u mean by rebuild log, I assume you mean to rebuild the code/project and post the build log so here it is:

-------------- Clean: Release in LinkedListAssignment (compiler: GNU GCC Compiler)---------------

Cleaned "LinkedListAssignment - Release"

-------------- Build: Release in LinkedListAssignment (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall -std=c99 -O2 -std=c99  -c "C:\Users\37712\Google Drive\C Projects\CodeBlocks Projects\LinkedListAssignment\LinkedListAssignment.c" -o obj\Release\LinkedListAssignment.o
mingw32-g++.exe  -o bin\Release\LinkedListAssignment.exe obj\Release\LinkedListAssignment.o  -s 
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: unrecognized option '-plugin'
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: use the --help option for usage information
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Offline Miguel Gimenez

  • Almost regular
  • **
  • Posts: 136
Re: error unrecognized option '-plugin'
« Reply #5 on: June 14, 2018, 10:16:16 am »
-plugin is a valid option for ld.exe starting with gcc 4.5.0, and in this case is passed by mngw32-g++. It seems the ld.exe version and mingw32-g++.exe one don't match. Do you have two installations of mingw?

Can you post the output of the following command (executed in CMD)?

Code: [Select]
mingw32-g++ -Xlinker -v
« Last Edit: June 14, 2018, 10:28:04 am by Miguel Gimenez »

Offline 37712

  • Single posting newcomer
  • *
  • Posts: 5
Re: error unrecognized option '-plugin'
« Reply #6 on: June 14, 2018, 10:53:02 am »
I don't think I have MinGW installed twice but i do have Cygwin installed, i dont know if that would be the reason.

here is the cmd code u asked me to run:

C:\Users\37712>mingw32-g++ -Xlinker -v
collect2 version 6.3.0
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe -plugin c:/mingw/bin/../libexec
/gcc/mingw32/6.3.0/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wra
pper.exe -plugin-opt=-fresolution=C:\Users\37712\AppData\Local\Temp\ccS4fIgE.res -plugin-opt=-pass-t
hrough=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass
-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-o
pt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -
plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-l
gcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through
=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -Bdynamic -u ___register_frame_info -u ___deregister_f
rame_info c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/6.3.
0/crtbegin.o -Lc:/mingw/bin/../lib/gcc/mingw32/6.3.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib
/gcc/mingw32/6.3.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../.. -v -lstd
c++ -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -
lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/6.3.0/crtend.o
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: unrecognized option '-plugin'
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: use the --help option for usag
e information
collect2.exe: error: ld returned 1 exit status

C:\Users\37712>
« Last Edit: June 14, 2018, 11:00:13 am by 37712 »

Offline 37712

  • Single posting newcomer
  • *
  • Posts: 5
Re: error unrecognized option '-plugin'
« Reply #7 on: June 14, 2018, 11:28:27 am »
*** PROBLEM RESOLVED ***

apparently it was a problem with my MinGW installation but I don't know what it was. I ended up completely uninstalling and reinstalling MinGW and that somehow fixed the problem.