Recent

Author Topic: Need advice about what I'm doing wrong when cross compiling  (Read 4788 times)

stab

  • Full Member
  • ***
  • Posts: 234
Need advice about what I'm doing wrong when cross compiling
« on: September 12, 2016, 10:59:41 pm »
Hi,

My system:
  Windows 7 32 bit
  Lazarus 1.6
  FPC 3.0.0
  SVN Rev: 51630
  i386-win32-win32/win64

Have written a small program that allows a user to select a directory. In that directory a list of  images is made and the user can select to either move or copy each second, third or so on.. file to another directory. The intention is to reduce the number of images from a video stream made for 3D modeling.
The program works as intended on my own computer. I installed latest Lazarus plus lazarus-1.6.0-fpc-3.0.0-cross-x86_64-win64-win32.exe to be able to cross compile to win 64 bit.

Config and Target
Target OS:               Win64
Target CPU family:       x86_64-win64-win32
Target processor:        Default

Target-specific options: Win32 gui application
Current LCL widgetset:   "win32"

This is a fairly simple program that compiles with success, but on a win 7 64 bit computer just gives the same old message: The version of this file is not compatible with the version of Windows you're running. etc...

How can I get a hint about what is wrong?

Regards
stab

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Need advice about what I'm doing wrong when cross compiling
« Reply #1 on: September 12, 2016, 11:31:29 pm »
Try to run the application on 32-bit, if it doesn't run it is 64 bits, usually a error dialog will show.

If you don't mind on sharing it upload it somewhere so we can test it under 64 bit too.

Handoko

  • Hero Member
  • *****
  • Posts: 5129
  • My goal: build my own game engine using Lazarus
Re: Need advice about what I'm doing wrong when cross compiling
« Reply #2 on: September 13, 2016, 11:01:24 am »
Have you tried to create a simple Hello World program and compile it to run on Win7 64-bit target?

It it works, then it means there could be something wrong in your code (the image/video program) or maybe you're using a library that is not compatible with Win 64-bit.

But if it don't work, you may need to reinstall the FPC/Lazarus. A complete uninstallation and reinstallation is better.

stab

  • Full Member
  • ***
  • Posts: 234
Re: Need advice about what I'm doing wrong when cross compiling
« Reply #3 on: September 13, 2016, 07:32:56 pm »
The program runs OK in win7 32 bit(my own machine) but not in win 7 64 bit.

Attached is the program.
Due to restriction max. 250 Kb I'm not able to send testimages but they are
supposed to be contained in a directory and numbered like:
MVI_3572001.jpg
MVI_3572002.jpg
MVI_3572003.jpg
MVI_3572004.jpg
MVI_3572005.jpg
MVI_3572006.jpg
MVI_3572007.jpg
MVI_3572008.jpg
.
.
.

Regards
stab

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Need advice about what I'm doing wrong when cross compiling
« Reply #4 on: September 13, 2016, 10:24:40 pm »
This program works in Windows 64 bits.

The problem is that you need to cross-compile with the settings I'm attaching here.

stab

  • Full Member
  • ***
  • Posts: 234
Re: Need advice about what I'm doing wrong when cross compiling
« Reply #5 on: September 13, 2016, 11:03:16 pm »
Thanks a lot for your help lainz!!!

 

TinyPortal © 2005-2018