Pelles C forum

C language => Beginner questions => Topic started by: rp108 on June 22, 2014, 02:43:11 AM

Title: How to create exe within the IDE
Post by: rp108 on June 22, 2014, 02:43:11 AM
I have been studying the manual, specifically the linker options, that allow creating main.exe from main.obj.

I don't understand where to place these parameters.

The syntax of:  POLINK filespec  does not tell me where to place these parameters so that I can Build an exe within the environment.

I poked thru the Properties dialog of the Project menu to no avail.

I did some google searching for this, but only found forum posts where someone asked this very same question, but only got the answer "read the manual" ..... which I have.

Any help would be much appreciated.  :-)

Title: Re: How to create exe within the IDE
Post by: Athan on June 22, 2014, 09:28:14 AM
An executable is automatically created inside the source folder whenever you "build" a project by using the IDE.
Also, most compiler and linker options are available through the "Project Options" dialog.
Title: Re: How to create exe within the IDE
Post by: rp108 on June 22, 2014, 06:37:03 PM
Thank-you for reply Athan,

My test program is very simple.

When I run the Build, the dialog at the bottom of the IDE does not indicate that an exe was created and I cannot find an exe in the source folder.

I have included my simple code and the text from the status window for the Build.

Any ideas?

Many thanks.


========= Begin Code ==========
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpCmdLine, int nCmdShow)
{
    MessageBox(NULL, "Hello world!", "Note", MB_OK);
    return 0;
}

========== End Code ==========


======== Begin Status from Compile/Link ========

Building C:\BU\Pellus_C_projects\Test03_Win64-Static-Lib\output\main.obj.
Building C:\BU\Pellus_C_projects\Test03_Win64-Static-Lib\Test03_Win64-Static-Lib.lib.
Done.


======== End Status from Compile/Link ========

Title: Re: How to create exe within the IDE
Post by: frankie on June 22, 2014, 07:01:18 PM
You're creating a static library.
When creating a window project (File->New->Project) select project type as shown in the image.
Title: Re: How to create exe within the IDE
Post by: rp108 on June 22, 2014, 10:27:10 PM
Thanks Frankie,

Works like a charm.

Best,
rp108