NO

Author Topic: How to view included files  (Read 1396 times)

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
How to view included files
« on: December 12, 2024, 12:24:16 PM »
I am updating old programs. But I've got a little problem. Not all files are displayed in the left panel.
In the programs I have worked in in recent years, those files are not displayed in older programs. I compared between the ones that work and the ones that don't but can't find any difference. Is there a setting or something else that needs to be done in Pelles-C for them to be included?
The picture I attached shows what I mean (it is the latest test of code from a forum member where it works).

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2151
Re: How to view included files
« Reply #1 on: December 12, 2024, 12:29:38 PM »
try to remove .tag file if it helps
May the source be with you

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #2 on: December 12, 2024, 02:41:04 PM »
OK!
I will try it!

Offline John Z

  • Member
  • *
  • Posts: 920
Re: How to view included files
« Reply #3 on: December 12, 2024, 02:43:38 PM »
I think TimoVJL is right - it should 'fix' it.

To remove/delete/or rename the .tag file first close the project then
navigate to the project directory and delete it or rename it.  The .tag
file will be recreated when you next open the project.

Since the .tag file is actually a SQL db file the format may have changed.
You can also view the .tag file with a SQL Lite browser -

From time to time I've had the opposite issue - the panel will show doubled
entries.  That is one or more procedure show in two lines of the tree view.
So I delete the .tag and everything recovers.

John Z

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #4 on: December 12, 2024, 03:16:13 PM »
No, that didn't help.
Put all files in another folder except the .c and .rc files and created new project.
Didn't help!
(Gets a lot of new errors too)

Offline John Z

  • Member
  • *
  • Posts: 920
Re: How to view included files
« Reply #5 on: December 12, 2024, 03:22:46 PM »
Hi Alderman2,

Another possibility is they are not being recognized as valid C files.
Tedious, but you might need to open each one in a text editor, Or even Pelles IDE
and make sure that there is at least a one new line after the last code statement
in the file.

You might try it on just one file first to see if it helps.

John Z

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #6 on: December 12, 2024, 03:42:15 PM »
The function that is not included in the list, which I have circled in red in the image, is an internal function in the main c file.
I get all such files in several of the projects but not all. (I got rid of all the new warnings now. I added some in "Project Options", including "WIN32_DEFAULT_LIBS".)

Several years ago I had the same problem. Then I emailed Pelle and sent him a project so he could see what was wrong. He answered what I should do but I no longer remember the answer. After I did as he said it worked perfectly.

My hiatus from programming has left me rusty. Don't remember everything.

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #7 on: December 12, 2024, 03:56:43 PM »
I remember solving the problem before by making a template of a project like this work. Since then I have always used that template. The same template I posted in the other thread to test the error with Win 24H2.
I did this:
- Copied the template to the folder the new project is to be built in.
- Renamed all files to the new name.
- Opened the .prj file and renamed it from "Template" to the new name.
- Opened the .RC file and renamed it to the new name.
- Created an icon with the new name.
- Tested if it worked and sometimes fixed some errors or warnings.
- Started writing my code.
So I have been working with several of my projects for several years to get everything in that list we talk about. Has worked perfectly. If I create a new project through Pelles-C it becomes complicated, for example the project ends up in the wrong folder. Have to work a bit to end up in the right folder. Then I had to change settings and add .libs, WIN32_DEFAULT_LIBS and some other things. Also, I didn't always get features in that list like in the picture I showed. Med mallen fungerar det alltid perfekt. So, the question is what differentiates the template from creating a new project?
« Last Edit: December 12, 2024, 04:01:56 PM by alderman2 »

Offline John Z

  • Member
  • *
  • Posts: 920
Re: How to view included files
« Reply #8 on: December 12, 2024, 05:39:36 PM »
Well I only use the default wizards which I guess you are calling templates?

I do know that the default ones are DLLs.  Also know that DLL for Pelles Add-ins
need to be rebuilt, most of the time, when a new version of Pelles issues.

Maybe not helpful - but its all I have....

John Z

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2151
Re: How to view included files
« Reply #9 on: December 12, 2024, 05:58:12 PM »
Pelles C have project Wizard interface
Experimental New Workspace Add-In
May the source be with you

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #10 on: December 12, 2024, 07:27:07 PM »
Well I only use the default wizards which I guess you are calling templates?

I do know that the default ones are DLLs.  Also know that DLL for Pelles Add-ins
need to be rebuilt, most of the time, when a new version of Pelles issues.

Maybe not helpful - but its all I have....

John Z
No, I made a template of a project that worked well after I spoke with Pelle.
« Last Edit: December 12, 2024, 10:44:55 PM by alderman2 »

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #11 on: December 12, 2024, 07:29:13 PM »
Pelles C have project Wizard interface
Experimental New Workspace Add-In
I tested it at the bottom. Getting a message "A program is required to read the dll file". What kind of program is it?

EDIT:
Forgot to translate before posting the last two entries.
First I write in Swedish, then I translate it.
« Last Edit: December 12, 2024, 10:46:25 PM by alderman2 »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2151
Re: How to view included files
« Reply #12 on: December 12, 2024, 07:36:49 PM »
Wizards should copy to bin\Wizards64 folder
After restarting poide use File -> New -> Project...

Wizards ska kopieras till mappen bin\Wizards64
Efter omstart av poide använder du Arkiv -> Ny -> Projekt...
« Last Edit: December 12, 2024, 07:42:19 PM by TimoVJL »
May the source be with you

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #13 on: December 12, 2024, 10:47:58 PM »
OK!
I will try it!

Offline alderman2

  • Member
  • *
  • Posts: 60
    • Xmag
Re: How to view included files
« Reply #14 on: December 13, 2024, 01:49:54 PM »
Now I have tested with different settings and changed the code, etc.:

- Picture 1 shows what it looks like with a function prototype at the top and the function at the bottom. It doesn't work in this old code but works in new codes.

- Picture 2 shows what it looks like with the function at the top and no function prototype. It works in this old code and in new codes.

I have compared the settings and the codes between the old code and newer codes. I can't find any difference?! So, why won't it be the same for both codes?

The reason I ask is because I intend to update codes from the year 2002 and forward so that the compiled programs work with newer Windows. But then I want the older code to appear in the editor in the same way as the newer programs.
« Last Edit: December 13, 2024, 01:57:08 PM by alderman2 »