NO

Author Topic: Converting 32-bit project to 64-bit project  (Read 3429 times)

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Converting 32-bit project to 64-bit project
« on: March 20, 2008, 09:20:10 PM »
Today I converted some 32-bit PellesC 4.5 projects into 64-bit PellesC 5.0 beta2 projects.

I always had to correct the library and includes folders after pushing the defaults button on the folders tab to add the Win64 and the Win\gl subfolders.
I had to reorder the folders too, to get the same ordering as in the IDE main settings.

If I push the Defaults button, I expect to get the same contents as in the IDE settings, any way to allow this ???
---
Stefan

Proud member of the UltraDefrag Development Team

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Converting 32-bit project to 64-bit project
« Reply #1 on: March 21, 2008, 07:00:54 PM »
the correct project type in the project symbol POC_PROJECT_TYPE is important for the IDE in some cases (like this one). I might add some form of conversion in the future, but for now the easiest way is probably to (caryfully) edit the PPJ file directly using some editor.

Here is the list of known project types (from wizard.h):

Code: [Select]
enum WizProjType {
    Project_Win32_GUI = 0,
    Project_Win32_DLL = 1,
    Project_Win32_Library = 2,
    Project_Win32_Console = 3,
    Project_WinCE_Pocket_PC_GUI = 4,
    Project_WinCE_Pocket_PC_DLL = 5,
    Project_WinCE_Pocket_PC_Library = 6,
    Project_WinCE_Smartphone_GUI = 7,
    Project_WinCE_Smartphone_DLL = 8,
    Project_WinCE_Smartphone_Library = 9,
    Project_Win64_GUI = 10,
    Project_Win64_DLL = 11,
    Project_Win64_Library = 12,
    Project_Win64_Console = 13,
    Project_Win32_Installer = 50,
    Project_WinCE_Pocket_PC_Installer = 51,
    Project_WinCE_Smartphone_Installer = 52,
};
/Pelle

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Converting 32-bit project to 64-bit project
« Reply #2 on: March 21, 2008, 09:09:07 PM »
the correct project type in the project symbol POC_PROJECT_TYPE is important for the IDE in some cases (like this one). I might add some form of conversion in the future, but for now the easiest way is probably to (caryfully) edit the PPJ file directly using some editor.
Thanks for the info, will do as suggested the next time.
I will check the converted projects too, to make sure they are the correct type.
---
Stefan

Proud member of the UltraDefrag Development Team

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Converting 32-bit project to 64-bit project
« Reply #3 on: March 21, 2008, 09:45:03 PM »
OK. This should/will be better handled in the future, but I prefer to wait until the version after 5.0. Perhaps I can write some simple step-by-step instructions in the mean time...

EDIT

OK, probably overkill but something like this:

Code: [Select]
How to convert a 32-bit project to a 64-bit project in Pelles C v5.0.

1) Use "Open..." on the "File" menu to locate the *.PPJ file, and then make sure
   "Open As" is set to "Text" at the bottom of the dialog. This will open the
   project file in text mode.

2) Make sure we are modifying a v5.0 project file by looking for:
   POC_PROJECT_VERSION = 5.00.1
   (on line 6, usually)

3) Change the project version assigned to POC_PROJECT_TYPE:
   POC_PROJECT_VERSION = <number>#

   If <number> is 0, change it to 10 (Win32 GUI -> Win64 GUI)
   If <number> is 1, change it to 11 (Win32 DLL -> Win64 DLL)
   If <number> is 2, change it to 12 (Win32 Library -> Win64 Library)
   If <number> is 3, change it to 13 (Win32 Console -> Win64 Console)

4) Save the *.PPJ file.

5) Open the *.PPJ file as normal ("Open As" set to "Auto").

6) Go to "Project options" (Project -> Project options).

7) Select "X64" machine on the "Compiler" tab.

8) Select "X64" machine on the "Assembler" tab (if used).

9) Select "X64" machine on the "Linker" tab.

10) Select the "Folders" tab, and then change the path:
    "<some-path-to-pelles-c>\Lib\Win"
    to
    "<some-path-to-pelles-c>\Lib\Win64"

    (Click the "Default" button).

11) Click OK, to save the project options. Done.
« Last Edit: March 21, 2008, 10:51:46 PM by Pelle »
/Pelle