1. Unable to compile with -rc-file option using TDM-GCC-64

Hi, I have no problem to compile with TDM-GCC-64 if no use of the -rc-file option. If I use this Option I get :

C:\Euphoria\Cltests\Curl-exe>euc -rc-file EuCurl.rc -gcc eucurl.ex

Build directory: build-267863\

Translating code, pass: 1 2 3 generating

Compiling with GCC

Compiling 14% init-.c

Compiling 57% EuCurl.c

Compiling 85% main-.c

Linking 100% ..\EuCurl.exe

C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `C:/Euphoria/Cltests/Curl-exe/build-267863/EuCurl.res' is incompatible with i386 output

collect2.exe: error: ld returned 1 exit status Unable to link C:\Euphoria\Cltests\Curl-exe\EuCurl.exe Status: 1 Command: gcc -o C:/Euphoria/Cltests/Curl-exe/EuCurl.exe init-.o EuCurl.o main-.o C:/Euphoria/Cltests/Curl-exe

/build-267863/EuCurl.res C:/Euphoria/bin/eu.a -m32

The .rc file used is one line : "EuCurl ICON SRCDIR\xxx.ico" and works with Watcom

It would be great if someone get an idea about this problem ! Thanks a lot !

new topic     » topic index » view message » categorize

2. Re: Unable to compile with -rc-file option using TDM-GCC-64

clkeriolet said...

Hi, I have no problem to compile with TDM-GCC-64 if no use of the -rc-file option. If I use this Option I get :

C:\Euphoria\Cltests\Curl-exe>euc -rc-file EuCurl.rc -gcc eucurl.ex

Build directory: build-267863\

Translating code, pass: 1 2 3 generating

Compiling with GCC

Compiling 14% init-.c

Compiling 57% EuCurl.c

Compiling 85% main-.c

Linking 100% ..\EuCurl.exe

C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386:x86-64 architecture of input file `C:/Euphoria/Cltests/Curl-exe/build-267863/EuCurl.res' is incompatible with i386 output

collect2.exe: error: ld returned 1 exit status Unable to link C:\Euphoria\Cltests\Curl-exe\EuCurl.exe Status: 1 Command: gcc -o C:/Euphoria/Cltests/Curl-exe/EuCurl.exe init-.o EuCurl.o main-.o C:/Euphoria/Cltests/Curl-exe

/build-267863/EuCurl.res C:/Euphoria/bin/eu.a -m32

The .rc file used is one line : "EuCurl ICON SRCDIR\xxx.ico" and works with Watcom

It would be great if someone get an idea about this problem ! Thanks a lot !

Maybe the rc file is for 64 bit. And the compiler seems to set to create executible for 32 bit. We might have broken something, as I don't think we have unit tests for rc files. After running unit tests we wouldn't know. Can you call

eui -version 

and reply with the output here?

It is possibly caused by a bug in euc, or perhaps it is your compiler.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Unable to compile with -rc-file option using TDM-GCC-64

clkeriolet said...

The .rc file used is one line : "EuCurl ICON SRCDIR\xxx.ico" and works with Watcom

I'm not sure this will be helpful at all, but how did you create the res file?

Here's the line I use:

windres setup.rc -O Coff setup.res -F pe-i386 

That lets me use it with mingw32-make:

euc -extra-lflags "-mwindows setup.res" -makefile -build-dir build MyApp.exw 
eui.exe C:\euphoria41-32bit\source\euc.ex -batch -extra-lflags "-mwindows setup.res" -makefile -build-dir build MyApp.exw 
mingw32-make -C build -f MyApp.mak -j 4 

That was working before other issues started, so I can't really diagnose/test right now. But when it was working, that is what was working.

Hope that helps in some way!

new topic     » goto parent     » topic index » view message » categorize

4. Re: Unable to compile with -rc-file option using TDM-GCC-64

The problem is the translator is using the -m32 flag and it should default to using -m64 on a 64 bit machine. So perhaps if you use the arch flag to specify the 64 bit one, you'll get a 64 bit executible. Again, the version information is very important to know when this started. Are you using the tip version?

new topic     » goto parent     » topic index » view message » categorize

5. Re: Unable to compile with -rc-file option using TDM-GCC-64

Thanks for your help,

I checked my eui version and obviously it is a 32 bit version :

C:\>eui -version

Euphoria Interpreter v4.1.0 development

32-bit Windows, Using System Memory

Revision Date: 2015-02-02 14:18:53, Id: 6300:57179171dbed

Does it exist a 64 bit version ?

I produced my rc file with a standard text editor and did not produce myself a .res file I supposed that would be done automatically by the euc or the TDM compiler ! (sorry I am not very clever in that field !) Should I do windres setup.rc -O Coff setup.res -F pe-i386 before euc ?

And as you suggest how to use the "arch flag" is it something like euc -arch-flag "-m64" -gcc .... ??? many Thanks

new topic     » goto parent     » topic index » view message » categorize

6. Re: Unable to compile with -rc-file option using TDM-GCC-64

You can even build your own.

For your case you can use the -arch option for translating your app.

There is the manual (RTM)

new topic     » goto parent     » topic index » view message » categorize

7. Re: Unable to compile with -rc-file option using TDM-GCC-64

Hello everybody ! From your nices indications, here is what I did : it works and the Icon is well there in the .exe :

My new setup.rc file is just : "MyApp ICON MyIcon.ico" I left over the SRCDIR since not accepted by windres

Then as you suggest to produce the good setup.res file : windres setup.rc -O Coff setup.res -F pe-i386

And then to compile and link euc -extra-lflags "c:\Mydirectory\setup.res" -GCC MyAPP.ex (I left over -mwindows)

Many Many thanks

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu