NO

Author Topic: POIDE when building files....  (Read 3817 times)

CommonTater

  • Guest
POIDE when building files....
« on: May 12, 2011, 09:05:21 PM »
In a POIDE project there are two sets of file paths INCLUDE and LIB...

I've checked the environment with set... and have noticed that when compiling any additional paths in a project are NOT set into environment variables during build...

So, is POIDE adding these to the command line automagically when invoking the compiler and linker?
Is it adding the whole INCLUDE path and LIB path... or only the extras from the project?

Any info about this would be helpful...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: POIDE when building files....
« Reply #1 on: May 13, 2011, 03:23:10 PM »
I think that poide use only include/lib from project-file.
You can insert INCLUDE and LIB environment variables to project.file from Project -> project options ...  tab Folders button Defaults

EDIT:
Maybe poide.exe and pomake.exe create INCLUDE and LIB environment variables when you run them.
PellesCDir is used too.

INCLUDE = $(PellesCDir)\Include;$(PellesCDir)\Include\Win#
LIB = $(PellesCDir)\Lib\Win#

Test program fake.c for CC and LINK:
Code: [Select]
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv)
{
printf("\n");
for (int i = 0; i < argc; i++)
printf("%s ", argv[i]);
printf("\nINCLUDE=%s\n", getenv("INCLUDE"));
printf("LIB=%s\n", getenv("LIB"));
printf("PellesCDir=%s\n", getenv("PellesCDir"));
return 0;
}
« Last Edit: May 13, 2011, 05:33:15 PM by timovjl »
May the source be with you

CommonTater

  • Guest
Re: POIDE when building files....
« Reply #2 on: May 13, 2011, 04:13:16 PM »
Hi Timo...
What I was trying (unsuccessfully) to figure out is how the two sets of paths get used.  I do know how to set them with the opitions dialogs (I've been using PellesC since version 2.0).

The reason I asked is that I noticed there are also two environment strings set.  You can see them if you open a command shell (with my addin) and do set... but when you change the paths in project->options they do not change.  Also if  you open a command shell from your desktop, you don't see them.  That struck me as a little odd, so I was wondering just how the paths are actually applied during a build...

There seems no way to observe the command lines during a build...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: POIDE when building files....
« Reply #3 on: May 13, 2011, 08:46:42 PM »
Quote
There seems no way to observe the command lines during a build...
Verbose build ?
I use it.

EDIT:
Verbose option controls .SILENT target in ppj-file.
If you remove or comment it out you should see commandline for target.

From pomake help:
.SILENT  POMAKE will not display commands on the screen when this target is defined; same as using the /S option.
« Last Edit: May 14, 2011, 10:54:38 AM by timovjl »
May the source be with you

CommonTater

  • Guest
Re: POIDE when building files....
« Reply #4 on: May 14, 2011, 12:02:04 AM »
Interresting suggestion Timo... I tried it and it still doesn't show me the command lines...

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: POIDE when building files....
« Reply #5 on: May 14, 2011, 08:04:45 AM »
Use process explorer from the SysInternals, which displays the command line in the properties of the process ;)
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: POIDE when building files....
« Reply #6 on: May 15, 2011, 02:22:54 AM »
[
EDIT:
Verbose option controls .SILENT target in ppj-file.
If you remove or comment it out you should see commandline for target.

From pomake help:
.SILENT  POMAKE will not display commands on the screen when this target is defined; same as using the /S option.

That got it!  Commenting out the .SILENT line did the trick. Thanks Guys... much appreciated.

BTW... the "fake" pocc.exe idea was a really cool trick...


For future reference...
The environment variables INCLUDE and LIB are changed during a build... But they are changed sometime _after_ the AddInMain call to AIE_PRJ_STARTBUILD and returned to defaults sometime before AIE_PRJ_ENDBUILD... so it's not possible to examine them with an AddIn (which was my first approach). This also means any attempt to modify environment variables INCLUDE and LIB through an AddIn will fail.



« Last Edit: May 15, 2011, 02:36:05 AM by CommonTater »