Version 2.0.2 compatibility
#1
Hello! I hope you are all well. 

It's been a while since I came here for certain commitments that I could not neglect but today I see that you have gone a long way: good!

I tried to compile my project with version 3.4.1 and I get an error while the same project with version 2.0.2 comes to fruition.

Evidently there is a compatibility problem but I can not figure out where it is because I do not see informative messages. I attach the log of the compilation in the hope that someone can tell me where it is i find the error.

Thank you!

___
internal\c\c_compiler\bin\c++.exe  -w -std=gnu++11 -DGLEW_STATIC -DFREEGLUT_STATIC -Iinternal\c\libqb/include -DDEPENDENCY_IMAGE_CODEC -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE -DDEPENDENCY_LOADFONT -DDEPENDENCY_DEVICEINPUT -DDEPENDENCY_AUDIO_MINIAUDIO internal\c/qbx.cpp -c -o internal\c/qbx.o
internal\c\c_compiler\bin\windres.exe -i internal\temp\icon.rc -o internal\temp\icon.o
internal\c\c_compiler\bin\objcopy.exe -Ibinary -Oelf32-i386 -Bi386 internal\temp/data.bin internal\temp/data.o
internal\c\c_compiler\bin\c++.exe  -w -std=gnu++11 -DGLEW_STATIC -DFREEGLUT_STATIC -Iinternal\c\libqb/include -DDEPENDENCY_IMAGE_CODEC -DDEPENDENCY_NO_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE -DDEPENDENCY_LOADFONT -DDEPENDENCY_DEVICEINPUT -DDEPENDENCY_AUDIO_MINIAUDIO internal\c/libqb_make_01000101110000.o  internal\c/qbx.o internal\temp\icon.o internal\temp/data.o -o "D:\161\NC_07-phoenix.exe"  internal\c\libqb/src/threading.o internal\c\libqb/src/buffer.o internal\c\libqb/src/filepath.o internal\c\libqb/src/threading-windows.o internal\c/parts/video/image/image.o internal\c/parts/gui/tinyfiledialogs.o internal\c/parts/gui/gui.o internal\c/parts/video/font/ttf/src.a internal\c/parts/input/game_controller/src.a internal\c/parts/audio/audio.o internal\c/parts/audio/miniaudio_impl.o internal\c/parts/audio/extras/mod_ma_vtable.o internal\c/parts/audio/extras/radv2_ma_vtable.o internal\c/parts/audio/extras/libxmp-lite.a internal\c/parts/audio/extras/midi_ma_vtable_stub.o internal\c/parts/core/src.a  -static-libgcc -static-libstdc++ -lcomdlg32 -lole32 -mwindows -lopengl32 -lglu32 -lwinmm -lwinmm -lwinmm -lksguid -ldxguid -lole32 -lgdi32
d:/qb64/internal/c/c_compiler/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `internal\temp/data.o' is incompatible with i386:x86-64 output
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:430: D:\161\NC_07-phoenix.exe] Error 1
Reply
#2
Are you planning to sell the program you want to create? If not, write something in blue. Cannot convey things only out of compiler error messages.

No wait, I caught something. Are you trying to compile a 64-bit program in 32-bit QB64? Or are you trying to do 32-bit program with 64-bit libraries? They don't mix. You have to reconstruct QB64(PE) and then try to compile your program again.
Reply
#3
I'm not sure what you mean by the color "blue".

Usually the compiler shows the error during compilation but in this case it just says that there was an error and to look at the log. I can't understand the log (which shouldn't be surprising).

Basically I have no clue as to where the problem is!

Sell the application? Why? Who cares?

About QB version is 64bit and system is 64bit
Reply
#4
Out of all that, there's only one really useful line of information in it:

Code: (Select All)
d:/qb64/internal/c/c_compiler/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `internal\temp/data.o' is incompatible with i386:x86-64 output

i386 architecture of input file `internal\temp/data.o' is incompatible with i386:x86-64 output

Somehow you've got a 32-bit data file, which isn't going to work with a 64-bit compiler.  

And I has no idea how you'd do that, much less how one would go about fixing it.  Let's wait and see what some of the others, who are a lot more versed in the c-side of things than me, can tell us about this type glitch.  Wink
Reply
#5
Thank You! I hope...
Reply
#6
I would rename the original d:\qb64 to d:\qb64-original.  Then install the current QB64, in the flavor desired 32 or 64 bit.

Then using only copy, take the "-original" source files and copy to the new "QB64" folder.  I do this all the time on major new releases.  Any dependencies like .h or .bm should be copied too.  You will realize those files when in the new install "qb64" things are missing when compiled.

By doing it this way, any problems such as mixing of 32 and 64 bit compiler stuff, just disappears.  A fresh directory exists for you to continue using.  You can archive (recommended) or delete the -original folder if space is a problem.  It's 1000's of files and NTFS being superior to FAT file system.  Still likes a lean directory structure.

Hope this helps.
Reply
#7
(11-25-2022, 11:07 AM)krovit Wrote: I'm not sure what you mean by the color "blue".

Usually the compiler shows the error during compilation but in this case it just says that there was an error and to look at the log. I can't understand the log (which shouldn't be surprising).

Basically I have no clue as to where the problem is!

Sell the application? Why? Who cares?

About QB version is 64bit and system is 64bit
Who cares? Because you didn't show the source code, that's what I meant "write something in blue (background)", didn't want to bore anybody with just saying, "We need to see the source code, error messages from the compiler aren't enough".

"I have no clue as to where the problem is," if otherwise you aren't mixing and matching architectures then something else is wrong. If everything is 64-bit the mixing and matching library versions might be the culprit. Cannot use libraries furnished by the "QB64 Team" with everything else that belongs to QB64 Phoenix Edition.

You just gave us the error log but not the source code and that's why I said what I said. The compiler can only complain when it finds a reason for not generating an EXE file. I should have been more careful noticing that you're on Windows where the QB64 executable is furnished, not Linux where we have to create it from a script after having all the dependencies.

Anyway Doppler helped you better than I did.
Reply
#8
I think doppler is probably onto the issue.  I'd say you probably downloaded a new version, extracted it over an old version, and that's causing your issues.

Redownload a fresh version.  Extract it to a new directory all to itself, and see if the issue doesn't go away.  <-- Try that, and then report back to us if the problem still persists.
Reply
#9
(11-25-2022, 05:15 PM)mnrvovrfc Wrote:
(11-25-2022, 11:07 AM)krovit Wrote: I'm not sure what you mean by the color "blue".

Usually the compiler shows the error during compilation but in this case it just says that there was an error and to look at the log. I can't understand the log (which shouldn't be surprising).

Basically I have no clue as to where the problem is!

Sell the application? Why? Who cares?

About QB version is 64bit and system is 64bit
Who cares? Because you didn't show the source code, that's what I meant "write something in blue (background)", didn't want to bore anybody with just saying, "We need to see the source code, error messages from the compiler aren't enough".

"I have no clue as to where the problem is," if otherwise you aren't mixing and matching architectures then something else is wrong. If everything is 64-bit the mixing and matching library versions might be the culprit. Cannot use libraries furnished by the "QB64 Team" with everything else that belongs to QB64 Phoenix Edition.

You just gave us the error log but not the source code and that's why I said what I said. The compiler can only complain when it finds a reason for not generating an EXE file. I should have been more careful noticing that you're on Windows where the QB64 executable is furnished, not Linux where we have to create it from a script after having all the dependencies.

Anyway Doppler helped you better than I did.

Please note that I do not speak English and that the automatic translator sometimes chooses words that could be rude... It is easy not to understand each other or think that the other guy is a rude type.

However, there is no confusion between the files because it seems obvious to me that it is better to avoid extracting a new version on the old one. No... It's just a whole new folder. Only the source code is the old one.

Now I'm away from the workstation, tomorrow I'll put The screen shot of the error that, however, really does not seem to provide any clue.

Thank You
Reply
#10
This line in the error log:

Code: (Select All)
internal\c\c_compiler\bin\objcopy.exe -Ibinary -Oelf32-i386 -Bi386 internal\temp/data.bin internal\temp/data.o

seems to indicate a 32-bit "data.o" file was created. Quite possibly a 32-bit object file that is used by the linker to produce an executable. This is not compatible with 64-bit. This rings a bell because of the switches used in the program to convert to object file. Likely this came out of "DATA" statements in your program.

That line with "objcopy.exe" has to be investigated.

This line:

Code: (Select All)
internal\c/parts/audio/extras/libxmp-lite.a internal\c/parts/audio/extras/midi_ma_vtable_stub.o internal\c/parts/core/src.a  -static-libgcc -static-libstdc++ -lcomdlg32 -lole32 -mwindows -lopengl32 -lglu32 -lwinmm -lwinmm -lwinmm -lksguid -ldxguid -lole32 -lgdi32

is a very small portion of a really large command line (which is less likely to work on Linux but works quite well on Windows) that seems to be including 32-bit libraries into what is supposed to be a 64-bit program. A bunch of things say "32" which means 32-bit; the 64-bit libraries do not have such labelling. Again, the achitectures (i386/i486/i586/i686 for 32-bit, and amd64/x86_64 for 64-bit) are different and do not get along. If you say you are on a 64-bit system and have 64-bit QB64, then you cannot use 32-bit libraries nor object files at all.

If you said you tried compiling your program with a fresh installation of QB64 Phoenix Edition, instead of the old QB64 Team edition, and it's all on a 64-bit operating system then something is out of place here.

Where do you have QB64 installed? It should be inside the user account. Some people hate the extra typing that comes from that and therefore create a directory right under "C:\", but it would be at your own risk if you do it. Do not install into "Program Files (x86)" if it exists because this has been a historial mess that M$ created. It would require write permissions in the QB64 directory and at least the "internal" child directory, and it gets tiresome having to give confirmation to write something in there unless User Account Control is disabled, which is not recommended on Windows. I don't know how it is on Windows10+, I'm only speaking out of small experience with Windows10 and a bit better experience with Windows7 and the best at WindowsXP 32-bit.
Reply




Users browsing this thread: 6 Guest(s)