Forum > LCL

[SOLVED] Cannot find Win32Int used by Interfaces, incompatible ppu

(1/2) > >>

VitalArt:
Hello.
This problem arose out of another, which I posted about at https://forum.lazarus.freepascal.org/index.php/topic,39990.0.html, but I guess it ended up in the wrong subforum. The problem is as follows:

1)I needed the TBitMap class out of Graphics unit. Turns out it doesn't function properly without the inclusion of the Interfaces unit. But when I include the Interfaces unit (and add LCL to dependencies), the project fails to compile with the following message:
 
--- Code: Pascal  window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---win32int.pp(8,84) Fatal: Cannot find Win32Int used by Interfaces, incompatible ppu=C:\lazarus\lcl\units\x86_64-win64\win32\win32int.ppu, package LCL  The ppu is there, target and fpc version didn't change. Lazarus sees the win32int.pp.
2)I try to recompile win32int.ppu by manually adding C:\lazarus\lcl\interfaces\win32\ to project paths. It appears to find it only to fail on the following:
 
--- Code: Pascal  window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---win32callback.inc(1237,17) Error: identifier idents no member "IsSurrogate"3)I try to recreate the same situation in an empty project, but cannot.
4)I try to move the Interfaces unit in the uses clause around or move it the main .lpr file completely. The problem persists.
5)I try to create a new project from scratch and then transfer my source files there. The problem persists.
6)If I do a Clean + Build it appears as though the file win32callback.inc is compiled two times for some reason: during LCL build it's successful, and then during the final .exe build it fails with the aforementioned error.

What direction do I even start digging towards to fix this?

wp:
You seem to try to use unit graphics in a console program. I doubt if this will work. Write a gui program instead ("File" > "New" > "Project" > "Application"), and everything will be found correctly. Or avoid using graphics altogether. fcl-image provides image classes without the graphics unit: http://wiki.freepascal.org/fcl-image

VitalArt:

--- Quote ---Write a gui program instead ("File" > "New" > "Project" > "Application")
--- End quote ---
Nope, doesn't help. Same error.
I already suspected it wouldn't help since, again, if I create a new project even with a 'simple program' option, it all works fine.
I also tried creating an 'Application' project and transferring all my sources to there, and it fails to compile even when I strip it down to only the .lpr with no code! I'm starting to suspect that this problem will turn out to have a really stupid cause.
Also, now that I did that, I notice the following warning:

--- Code: Pascal  window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Warning: Recompiling Win32Int, checksum changed for Character

wp:
Something is badly wrong here. Please post the program which is not working. (all source files, no compiler-generated files, all packed into a common zip which is accepted by the forum software for upload under "Attachments and other options").

engkin:

--- Quote from: VitalArt on February 07, 2018, 11:48:59 am ---Also, now that I did that, I notice the following warning:

--- Code: Pascal  window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Warning: Recompiling Win32Int, checksum changed for Character
--- End quote ---

Do you have a unit in your source code called Character? If yes, you need to rename it. And delete its .o/.ppu files

Navigation

[0] Message Index

[#] Next page

Go to full version