News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

invalid option -- J

Started by yeye, September 16, 2008, 10:59:28 AM

Previous topic - Next topic

yeye

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.

||=== 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é

yeye

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 ...

Jenna

If you search the forum for ""--J" you should find the solution.

yeye

I did search for "-J" and not "-- J", thanks !
But the problem is elsewhere now :

-------------- 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)
$rescomp -i $file -I rc -o $resource_output -O coff $res_includes

Weird, isn't it ?
Yéyé

MortenMacFly

Quote from: yeye on September 16, 2008, 06:55:07 PM
windres.exe: unknown format type `H:\home\commun\dev\libs\wxWidgets-2.8.8\include'
$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:
Usage: windres.exe [option(s)] [input-file] [output-file]
As you see: Options first, then *only* input, then *only* output.
You do:
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

yeye

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 :

-------------- 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é

stahta01

#6
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
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]