Problem with Windows 7

Surasak
Posts: 28
Joined: Fri Jul 20, 2007 1:30 pm

Problem with Windows 7

Post by Surasak »

I have test my application (FWH 7.09) with Windows 7 and found some function not work (for example GetDiskFreeSpaceEx(),nSerialHD(),setdate(),settime() etc.)
Are this problem fix in FWH 9.10 ?
Actually I would like to waiting for completed unicode support version.
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

I have the problem With Windows 7 when using FWH functions or classes I get a message:
somename.prg was compiled by older version, PCODE version 7 is no longer supported - Please recompile.
"somename" is the name for ANY function or class from FWH...

The same Xhb and FWH compiles perfect in XP OS

What I can do?
I put all mentioned FWH PRG files in one folder and compile them as a LIB which I then include into the project. This way it works

But, I cannot recompile some Libraries which I do not have PRG files for it...

Any help or advice, what is different XP - Windows 7 regarding the xHB/FWH compiling linking?
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

This strange PCODE problem under Windows 7 seams have nothing to do with the xHB and FWH version, bur with operating system??
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Problem with Windows 7

Post by Enrico Maria Giordano »

No, the OS version has nothing to do with the PCODE problem. You are using an OBJ or a LIB compiled with an old version of [x]Harbour. Recompile all your PRGs with the new compiler and you're done. If you are using some third party LIB then you have to look for the source code or you will be unable to use it anymore.

EMG
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

Enrico,
Thanks for your answer. It sounds absolutely logical.

But I still thinks somehow the OS has to do with this PCODE
The same code, the SAME xHB, the SAME FWH on Windows 7 machine complains about PCODE and all the same on XP does not!?

I uninstall xHB and FWH on Windows 7 and delete ALL files from my project folder.
Then I install again xHB (sane version as on XP) and FWH (same version as on XP), copied all project files back to Windows 7
While compiling the program complains about PCODE again...

I am confused, because what you wrote is logical.
But the facts shows different

Any suggestions?
I did recompile all PRG from FWH which my compiler complains abut. In fact, I compiled ALL FWH PRG files from \FUNCTIONS \CLASSES \WINAPI folders and made one LIB file and include it into conpiling/linking process.
Works ok.
The problem are 3rd party libraries.
Why the xBuildW complains on Windows 7 and not on XP ??

Very strange
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

I must add that I am using the SAME xHB and FWH on both computers!
So there is nothing compiled with old version.

Boris
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Problem with Windows 7

Post by James Bott »

Borris,

>The problem are 3rd party libraries.

Are you saying that you did not or can not recompile the 3rd party libraries? Does the problem only occur when using these libraries? Can you compile a simple test program and run it without error on Win 7?

Regards,
James
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

James,

I was probably not very clear in my initial post, unfortunately my English is not good enough...

1. I was working for years on my XP machine on many projects. I was able to compile without any problem.

2. I got a new machine and I installed Windows 7 Ultimate

3. I installed the SAME version of xHB on a new machine

4. I installed the SAME version of FWH on a new machine

5. I copied my projects on a new machine

When I tried to compile the projects on a new machine, I get a messages that the PRG files are compiled with older PCODE version and I need to recompile PRg files with never PCODE version.
At the beginning I was confused, what PRG files are in question. Then I realized that the FWH files are the linker is complaining about.
- I copied all the FHW PRG files on one foleder
- I compiled them in one LIB file and included them into xBuildW
After this the compile/link process finished ok

Then I tried to compile/link another project using this new LIB file. It failed with a message that the "sqlrdd0.PRG" which is in SQL.LIB, is compiled with older version of PCODE. This project uses SQL connection.
The problem is I don't have the newer version of SQL.LIB (actually xHB) because the company I am working for, does not want to buy newer xHArbour Enterprise version and so I cannot use this SQL.LIB any more.
I also cannot recompile this LIB because of course I don't have the PRG files.

CONCLUSION:
This obviously HAS something ti do with the new Windows 7 OS I am using, I am sure about this because I use EXACTLY the same versions of xHB and FWH and project files on XP and Windows 7 machines.
But on Windows 7 machine the compiler/linker now complains about PCODE version.
Any suggestions would be appreciated very much, because I have to use Windows 7 but cannot work on projects which uses LIBs which I cannot recompile.

Not to mention, have no idea why I have to recompile them at all?

Boris
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

Nobody is using Windows 7 and compile the xHB/FWH projects on Windows 7 OS ??
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Problem with Windows 7

Post by James Bott »

Boris,
...unfortunately my English is not good enough...
Don't be rediculous, your English is great!

The link below explains the concept of Pcode. It is rather techincial but the basic issue is that it emulates running on a theoretical CPU, so the OS may be an issue.

http://en.wikipedia.org/wiki/P-code_machine

Can you run the same EXE compiled on the XP machine on the Windows 7 machine without the error?

I know that you may think you are compiling with exactly the same LIBs on the new machine but sometimes on an older machine there are old LIBs in the path somewhere that get linked in by mistake. I have had this happen and it drove me nuts trying to find the problem.

You could use a file compare program to see if EXEs compiled on both machines are exactly the same or not.

The 3-party SQL.LIB is going to continue to be a problem. If you can compile a working program on the XP machine that works under Windows 7, then you could just work on the XP machine and then transfer the EXEs to the Windows 7 machine. It's a pain but it is a solution.

Where did you get the 3-party lib? Can you get the source or a newer version? There is a version of a SQL RDD available on this forum, is that the same one you are using? If not, maybe you can convert to it so you will have the source.

This is why I am very resistant to using any 3-party lib that I don't have the source for.

Regards,
James
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Problem with Windows 7

Post by Otto »

Hello Boris,

maybe you have set up some Environment Variables in Windows XP which link to other files.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Problem with Windows 7

Post by Antonio Linares »

Surasak,

Have you tested it this way ?

Code: Select all

function Main()

   local nFreeBytes, nTotalNumber, nTotalFree

   GetDiskFreeSpaceEx( "C:\", @nFreeBytes, @nTotalNumber, @nTotalFree )
   
   MsgInfo( nFreeBytes )
   MsgInfo( nTotalNumber )
   MsgInfo( nTotalFree )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Re: Problem with Windows 7

Post by Davide »

Boris,

I heard that Windows 7 provides an "XP-mode" to prevent compatibility problems. I didn't try it myself, but you may give it a chance if nothing else suggested here does work.

Hi,
Davide
User avatar
codemaker
Posts: 208
Joined: Wed Dec 03, 2008 4:48 pm
Location: Belgrade, Serbia

Re: Problem with Windows 7

Post by codemaker »

James Bott wrote:Boris,
...unfortunately my English is not good enough...
Don't be rediculous, your English is great!
Thanks James :)
A Month ago I was in San Diego and LA and I remembered you (I think you're from San Diego, right?) But, many obligations and some work and a short time, didn't allow me to tray to find you. Next time maybe :)
James Bott wrote: The link below explains the concept of Pcode. It is rather techincial but the basic issue is that it emulates running on a theoretical CPU, so the OS may be an issue.

http://en.wikipedia.org/wiki/P-code_machine

Can you run the same EXE compiled on the XP machine on the Windows 7 machine without the error?
I will review this link.
And yes, I can run the EXE compiled on XP on Windows 7 normaly
James Bott wrote: I know that you may think you are compiling with exactly the same LIBs on the new machine but sometimes on an older machine there are old LIBs in the path somewhere that get linked in by mistake. I have had this happen and it drove me nuts trying to find the problem.

You could use a file compare program to see if EXEs compiled on both machines are exactly the same or not.
I am working this weekend to find out what is wrong. I also think that somehow some LIB or some other file is different and this might be a problem. I have to review this.
James Bott wrote: The 3-party SQL.LIB is going to continue to be a problem. If you can compile a working program on the XP machine that works under Windows 7, then you could just work on the XP machine and then transfer the EXEs to the Windows 7 machine. It's a pain but it is a solution.
The last solution will be to work on XP machine and run the code on Windows 7. This is what I am doing right now...

Thanks for your attention
Post Reply