Author Topic: help with compiler problems...  (Read 8839 times)

Anonymous

  • Guest
help with compiler problems...
« on: February 09, 2005, 08:39:57 pm »
Can't figure out what I did wrong in install. I installed VCToolkit, and MinGw compilers. Imported a Devv-C++ project, but when I try to rebuild all, I get the following message:

Project   : Project2
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : D:\CodingStuff\Isolation Booth\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: component.cpp
Compiling: main.cpp
Compiling: Rsrc.rc
windres.exe: invalid option -- J
Usage: windres.exe [option(s)] [input-file] [output-file]
 The options are:
  -i --input=<file>            Name input file
  -o --output=<file>           Name output file
  -I --input-format=<format>   Specify input format
  -O --output-format=<format>  Specify output format
  -F --target=<target>         Specify COFF target
     --preprocessor=<program>  Program to use to preprocess rc file
     --include-dir=<dir>       Include directory when preprocessing rc file
  -D --define <sym>[=<val>]    Define SYM when preprocessing rc file
  -v --verbose                 Verbose - tells you what it's doing
     --language=<val>          Set language when reading rc file
     --use-temp-file           Use a temporary file instead of popen to read
                               the preprocessor output
     --no-use-temp-file        Use popen (default)
  -h --help                    Print this help message
  -V --version                 Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified.  A single file name is an input file.
No input-file is stdin, default rc.  No output-file is stdout, default rc.
windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex binary ihex
Process terminated with status 1 (0 minutes, 3 seconds)
0 errors, 0 warnings

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
help with compiler problems...
« Reply #1 on: February 09, 2005, 09:40:43 pm »
It's a misconfiguration of the resource compiler, windres.exe.
MinGW's windres option "-I" is now deprecated (can't remember the exact windres version that happened) and "-J" should be used instead. But if your windres chokes on "-J", then just edit it in the advanced compiler options.

The solution is mentioned in this thread.

HTH,
Yiannis.
Be patient!
This bug will be fixed soon...

Anonymous

  • Guest
help with compiler problems...
« Reply #2 on: February 10, 2005, 04:27:15 am »
Thanks, that was helpful, but I've been reading about compiler flags and C++ directives, and link options and whatnot all day. I'm still having this trouble:

Project   : Project2
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\CodingStuff\Isolation Booth\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: component.cpp
C:\DOCUME~1\jessica\LOCALS~1\Temp/cckNbaaa.o(.text+0x2de): In function `ZN10CComponent14QueryInterfaceERK5_GUIDPPv':
D:/CodingStuff/Isolation Booth/component.cpp:40: undefined reference to `IID_IUnknown'
C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libmingw32.a(main.o)(.text+0x97):main.c: undefined reference to `[email protected]'
Process terminated with status 1 (0 minutes, 2 seconds)
2 errors, 0 warnings

Part of the problem is that there are three places to edit compiler options, that I have found so far. Any help clarifying this would be great.

John

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
help with compiler problems...
« Reply #3 on: February 10, 2005, 09:14:08 am »
To correct the two errors above, add a linker option -ldxguid and change the project type to "Console application".
As far as compiler options are concerned, you can change global compiler options ("Settings/Configure plugins/Compiler"), per-project compiler options and per-target compiler options. The last two, are configured in the same window ("Project/Build options") depending on the selected tree branch in that window.
Usually, you would configure per-project and/or per-target options. I 'm not sure why somebody would use the global compiler options but it's there as an option, just in case...
Note that when using per-project and per-target compiler options, you can configure the order in which they are applied.

HTH,
Yiannis.
Be patient!
This bug will be fixed soon...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
help with compiler problems...
« Reply #4 on: February 10, 2005, 10:20:00 pm »
Quote from: mandrav
add a linker option -ldxguid

Err, I meant -luuid  :oops:
Be patient!
This bug will be fixed soon...