Author Topic: invalid option -- J  (Read 6106 times)

Offline yeye

  • Single posting newcomer
  • *
  • Posts: 4
invalid option -- J
« on: September 16, 2008, 10:59:28 am »
Hey all,

That's the message I get instantly while I try compiling a new wxWidgets project with GCC.
I looked at the compiler options but never saw that J option.

Code
||=== test_wxWidgets, Release ===|
||invalid option -- J|
||supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex binary ihex|
||=== Build finished: 2 errors, 0 warnings ===|

Any idea ?
Thx,
Yéyé

Offline yeye

  • Single posting newcomer
  • *
  • Posts: 4
Re: invalid option -- J
« Reply #1 on: September 16, 2008, 11:30:40 am »
It seems to happen because I don't compile with the provided MinGW but the one from minGW website.
Are'nt they compatibles ?

I only changed the compiler PATH and all the executables seemed to be in place.

Well, I'll try recompile wxWidgets with that MinGW ...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: invalid option -- J
« Reply #2 on: September 16, 2008, 11:31:41 am »
If you search the forum for ""--J" you should find the solution.

Offline yeye

  • Single posting newcomer
  • *
  • Posts: 4
Re: invalid option -- J
« Reply #3 on: September 16, 2008, 06:55:07 pm »
I did search for "-J" and not "-- J", thanks !
But the problem is elsewhere now :

Code
-------------- Build: Debug in test_wxwidgets ---------------

Compiling: resource.rc
windres.exe: unknown format type `H:\home\commun\dev\libs\wxWidgets-2.8.8\include'
windres.exe: supported formats: rc res coff
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings

Windres seems to confound the path and the file

H:\home\commun\dev\libs\wxWidgets-2.8.8\include is the good path (declared in "project build options > search directories > Resource compiler"
wx.rc is at its place in H:\home\commun\dev\libs\wxWidgets-2.8.8\include\wx\msw\

Here is the line-code of resource compiler (after replacing -J by -I)
Code
$rescomp -i $file -I rc -o $resource_output -O coff $res_includes

Weird, isn't it ?
Yéyé

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: invalid option -- J
« Reply #4 on: September 17, 2008, 01:27:36 pm »
Code
windres.exe: unknown format type `H:\home\commun\dev\libs\wxWidgets-2.8.8\include'
Code
$rescomp -i $file -I rc -o $resource_output -O coff $res_includes
I don't think so. You tell the resource compiler to include only a path named "rc". The $res_includes is taken as objects. Why? Read the help of windres (simply call windres --help on a console), it says:
Code
Usage: windres.exe [option(s)] [input-file] [output-file]
As you see: Options first, then *only* input, then *only* output.
You do:
Code
windres.EXE [option(s)] [input-file] [output-file] [option(s)] 
Which is just wrong.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline yeye

  • Single posting newcomer
  • *
  • Posts: 4
Re: invalid option -- J
« Reply #5 on: September 18, 2008, 03:41:58 pm »
Well, thanks : I tried to change that command line, but with no success.
Desperated, I tried to change the compiler.

I installed the wxPack2.8 compiled with VC.

when I try to compile a new wxWidgets project on Code::Blocks, I have nearly the same error during the resource compiling :
Code
-------------- Build: Debug in test_wx2 ---------------

Execution of 'rc.exe /IE:\progs\wxWidgets2.8\include /IE:\progs\wxWidgets2.8\lib\vc_dll\mswud  -foobj\Debug\resource.res resource.rc' in 'H:\home\boulot\dev\cpp\test_wx2' failed.
Nothing to be done.

the file wx.rc is well located : E:\progs\wxWidgets2.8\include\wx\msw\wx.rc.

Did I miss something ?

Yéyé

Online stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: invalid option -- J
« Reply #6 on: September 18, 2008, 05:55:38 pm »
Which compiler? What version of it?

Ex. MS VC 8.0 express (2005) or MS VC 9.0 express (2008)


What OS? XP or Vista or what

FYI: Some people had issues using MinGW GCC if source code was over more that one drive.
You have library on E: and project on H:

But, your original problem was an very old copy of windres.exe

Tim S
« Last Edit: September 18, 2008, 06:03:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org