NO

Author Topic: Build process and PoMake  (Read 2126 times)

Grincheux

  • Guest
Build process and PoMake
« on: December 07, 2019, 04:06:20 AM »
Into my current project I would like to build, and compile source files. I don't thin that compiling is a problem but it is for linking files. If I build my project I use many libraries and many object files, so the command line is very very long. Does PoIde uses a response file for lnking?

An other problem is PoMake.

When I look at the project file it is very similar to a make file. I was wondering the ppj file is a make file. Yes or No?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Build process and PoMake
« Reply #1 on: December 07, 2019, 10:08:33 AM »
polink and poide support @response-file

add it from project options -> Macros -> LINKFLAGS
May the source be with you

Grincheux

  • Guest
Re: Build process and PoMake
« Reply #2 on: December 07, 2019, 10:47:32 AM »
Thank you for the answer.
Could you give an example?

I want to use TLIDE64 with my program. TLIDE would be an add-in.
What means TLIDE?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Build process and PoMake
« Reply #3 on: December 07, 2019, 11:13:36 AM »
In Project -> Project options... -> Macros -> LINKFLAGS , doubleclick to edit macro, add @YourProject.rsp

TestSystemMetrics is an example of using it.

TLIDE is just an example of IDE, just a toy. TinyLousyIDE ;)

May the source be with you

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Build process and PoMake
« Reply #4 on: December 07, 2019, 02:28:05 PM »
When I look at the project file it is very similar to a make file. I was wondering the ppj file is a make file. Yes or No?
Yes (a miniature version of it).

You can do POMAKE -f project.ppj
(it's in the help file, but you have to look for it.)

No edit of the .ppj file though, if you want to be sure it loads into the IDE ever again.
/Pelle

Grincheux

  • Guest
Re: Build process and PoMake
« Reply #5 on: December 07, 2019, 03:00:33 PM »
Thank You everybody for the answers.

I have found what I wanted just using the "VERBOSE BUILD"
I catch the result and I know how I have to do.

I have read the help file but I did not know how to pass the object files and the libraries.

Quote
A project file (or makefile) is a plain text file that can contain a mix of comment lines, macro definitions, description blocks, inference rules, and preprocessing directives. A long line may span more that one physical line in the file by immediately preceding the newline character with a backslash (like a C source file).

If someone like me creates many source files the link command line is very long.

Take a look:

Code: [Select]
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Columns.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Columns.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Cpu.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Cpu.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Cpuid.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Cpuid.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\crc64speed.obj"
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(138): warning #2215: Conversion from 'unsigned long long int' to '_Bool'; possible loss of data.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(223): warning #2215: Conversion from 'int' to '_Bool'; possible loss of data.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(181): warning #2154: Unreachable code.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(193): warning #2154: Unreachable code.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(205): warning #2154: Unreachable code.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(216): warning #2154: Unreachable code.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(234): warning #2261: Loop with no effect removed (any visible side-effects are retained).
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crc64speed.c(232): warning #2261: Loop with no effect removed (any visible side-effects are retained).
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\crcspeed.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\crcspeed.obj"
Building myEditor.tag.
> poasm.exe -AAMD64 -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\FileRead.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\FileRead.asm"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Files.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Files.obj"
Building myEditor.tag.
> poasm.exe -AAMD64 -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\FileWrite.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\FileWrite.asm"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Find & Replace.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Find & Replace.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Goto.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Goto.obj"
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Goto.c(27): warning #2118: Parameter '__lParam' is not referenced.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Goto.c(68): warning #2118: Parameter '__lParam' is not referenced.
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Insert.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Insert.obj"
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Insert.c(99): warning #2118: Parameter '__lParam' is not referenced.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Insert.c(171): warning #2118: Parameter '__lParam' is not referenced.
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Language.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Language.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Lines.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Lines.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Log.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Log.obj"
Building myEditor.tag.
> poasm.exe -AAMD64 -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\MemoryAlloc.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\MemoryAlloc.asm"
Building myEditor.tag.
> poasm.exe -AAMD64 -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\MemoryFree.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\MemoryFree.asm"
Building myEditor.tag.
> poasm.exe -AAMD64 -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\MemorySetTo0.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\MemorySetTo0.asm"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Menus.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Menus.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Mode.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Mode.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\myEditor.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\myEditor.obj"
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\myEditor.c(1233): warning #2118: Parameter '__lpszCmdParam' is not referenced.
C:\Users\Philippe\Documents\Pelles C Projects\myEditor\myEditor.c(1233): warning #2118: Parameter '__hPrevInstance' is not referenced.
Building myEditor.tag.
> porc.exe -N -L0x40c "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\myEditor.rc" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\myEditor.res"
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Notify.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Notify.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Profile.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Profile.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Selection.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Selection.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Toolbar.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Toolbar.obj"
Building myEditor.tag.
> pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -fp:precise -W2 -Ze -Zx -J "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Utilities.c" -Fo"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Utilities.obj"
Building myEditor.tag.
> polink.exe @myEditor.rsp -out:"C:\Users\Philippe\Documents\Pelles C Projects\myEditor\myEditor.exe" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Columns.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Cpu.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Cpuid.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\crc64speed.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\crcspeed.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\FileRead.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Files.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\FileWrite.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Find & Replace.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Goto.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Insert.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Language.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Lines.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Log.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\MemoryAlloc.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\MemoryFree.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\MemorySetTo0.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Menus.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Mode.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\myEditor.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\myEditor.res" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Notify.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Profile.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Selection.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Toolbar.obj" "C:\Users\Philippe\Documents\Pelles C Projects\myEditor\Compile\Utilities.obj"
Done.
« Last Edit: December 07, 2019, 03:02:52 PM by Grincheux »

Grincheux

  • Guest
Re: Build process and PoMake
« Reply #6 on: December 10, 2019, 08:22:07 PM »
I have created a ini file describing the compilers.
I have manually created a project file

My question is :

How can I detect an error in source file (.rc .asm or .c)
Does porc, poasm or pocc returns a code indicating a "complete failure".
I would like to use this as follow :

Code: [Select]
@ECHO OFF
C:\Program Files\PellesC\Bin\pocc.exe -std:C17 -Tx64-coff -arch:SSE2 -Ot -Ox -Ob2 -I"C:\Program Files\PellesC\Include\Win;C:\Program Files\PellesC\Include" -fp:precise -W2 -Ze -Zx -J "myEditor.c" -Fo"myEditor.obj"
IF ERRORLEVEL 99 GOTO FAILURE

C:\Program Files\PellesC\Bin\polink.exe -subsystem:windows -machine:x64 -release -largeaddressaware -LIBPATH:"C:\Program Files\PellesC\Lib\Win64;C:\Program Files\PellesC\Lib" @ResponseFile.rsp -out:"$EXE_FILE"

@ECHO NO errors found
@PAUSE
@EXIT
.
.
.
FAILURE:@ECHO Errors have been detected!
@PAUSE
@EXIT
« Last Edit: December 10, 2019, 08:27:10 PM by Grincheux »

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: Build process and PoMake
« Reply #7 on: December 15, 2019, 04:55:35 PM »
Like many programs, the Pelle's C tools will return either EXIT_SUCCESS (0) or EXIT_FAILURE (1).
ERRORLEVEL 99 is way too high to catch anything. Change it to ERRORLEVEL 1 it will work fine...
/Pelle

Grincheux

  • Guest
Re: Build process and PoMake
« Reply #8 on: December 15, 2019, 04:58:09 PM »
I did not know the value to set and 99 was for anwering the TRUE value.
Thank you for the answer.