User forums > Using Code::Blocks

tdm-gcc 32/64 bit targets under windows

(1/2) > >>

Russell:
Hello :)

I need to add a 32bit target to a project I am working on. Currently I use the tdm-gcc compiler and have to add the line "-F pe-i386" in toolchain->resource compiler, this is very undesirable as it affects ALL projects that are loaded with the IDE.

Is there a better way to accomplish this? I tried overriding the $recomp variable in the target itself to: "windres.exe -F pe-i386", this does not work

Thanks

stahta01:
I would try file properties and see if a custom compile command/string works for a single file.
If multiple files, I am not sure what I would do.

Edit: I would guess this string

--- Code: ---$rescomp -F pe-i386 $res_includes -J rc -O coff -i $file -o $resource_output

--- End code ---

Tim S.

Russell:
This works perfectly, thank you stahta01 :)

For those that are curious, I placed a variable named RCFLAGS into Build Options->Custom Variables, the value is "-F pe-i386" without quotes.

Right click on the resource file in the project and go to Properties->Advanced tab, click "Use custom build command for this file" and enter:

$rescomp $rcflags $res_includes -J rc -O coff -i $file -o $resource_output

For the 64bit target, I made the RCFLAGS value empty

oBFusCATed:
What is the real problem here? You're using 64bit compiler to build 32bit executables?

Jenna:
Why not creating a 64-bit and a 32-bit toolchain with the same compiler executables ?

Navigation

[0] Message Index

[#] Next page

Go to full version