Pelles C forum

C language => Expert questions => Topic started by: jwzumwalt on June 07, 2009, 06:28:38 AM

Title: Createing DLL project wizards
Post by: jwzumwalt on June 07, 2009, 06:28:38 AM
I have been experimenting with making project wizards for PelleC. I have become somewhat comfortable with the process. I can make user selectable check boxes etc, but I do not see how that information can be used to add include files or project option switches to compile instructions. Can anyone tell me whether this can be done or not?

For example I wold like the compiler include line to look similar to this...
LINKFLAGS = -subsystem:windows -machine:x86 ... opengl32.lib glu32.lib glaux.lib glut32.lib#
Title: Re: Createing DLL project wizards
Post by: JohnF on June 07, 2009, 01:52:08 PM
I have been experimenting with making project wizards for PelleC. I have become somewhat comfortable with the process. I can make user selectable check boxes etc, but I do not see how that information can be used to add include files or project option switches to compile instructions. Can anyone tell me whether this can be done or not?

For example I wold like the compiler include line to look similar to this...
LINKFLAGS = -subsystem:windows -machine:x86 ... opengl32.lib glu32.lib glaux.lib glut32.lib#


I don't know if one can directly control the LINKFLAGS - don't think so.
EDIT: You can try WizSetProjectSymbol() though.

You can add include files by adding lines in the template as in a normal C file - the files one includes via RCDATA.

You use WizSetProjectType() to set the type of app and libraries can be added using the #pragma directive in the template (C files).

John
Title: Re: Createing DLL project wizards
Post by: jwzumwalt on June 09, 2009, 02:44:09 AM
Thanks for the reply... I guess what I really want is going to require a custom text .ppj file.
Title: Re: Createing DLL project wizards
Post by: JohnF on June 09, 2009, 08:37:09 AM
I've just seen this from an example.

Code: [Select]
WizSetProjectSymbol("CCFLAGS","-W1 -Ot -Gz -Ze -Zx -Gn -Tx86-coff")

Presumably one can do the same with LINKFLAGS

Does that help?

John
Title: Re: Createing DLL project wizards
Post by: jwzumwalt on June 10, 2009, 12:54:44 AM
Yes this is intriguing. I will play with it and see if I can set the linker line in the same way - thank you!
Title: Re: Createing DLL project wizards
Post by: JohnF on June 11, 2009, 10:58:34 AM
It's worth mentioning that the help file says -

Note! WizSetProjectType must be called before WizGetProjectSymbol can be used.


EDIT for spelling.

John