# Windows exe of my program

**URL:** <https://swi-prolog.discourse.group/t/windows-exe-of-my-program/3819>\
**Category:** Help!\
**Tags:** how-to, software\
**Created:** [April 14, 2021, 8:53pm UTC](https://swi-prolog.discourse.group/t/windows-exe-of-my-program/3819 "2021-04-14T20:53:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rephaelbj](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/rephaelbj/32/3419_2.png) [@Rephaelbj](https://swi-prolog.discourse.group/u/Rephaelbj)\
**Post date:** [April 14, 2021, 8:53pm UTC](https://swi-prolog.discourse.group/t/windows-exe-of-my-program/3819/1 "2021-04-14T20:53:21Z")

</div>

So I’m attempting to create a windows exe file so I can later run it with `cmake`, however I’m not sure how to do this, I looked at the documentation but it doesn’t really help. I’m compiling with this line in the command prompt :

```dos
swipl -o my_executable -g main --stand_alone=true -c store.pl types.pl

```

and here’s my code for **store:**

```prolog
:- consult(types).
program(program(X)) --> k(X).

% Default block value
k(block(X)) --> [start], store(X), [end].

%Check if value is a string
store(t_assignmentS(X,Y)) --> [store], ['('], [X], [','], string(Y), [')'] ,[$], !.

% Check if it's a boolean
store(t_assignmentB(X, Y)) --> [store], ['('], [X], [','], boolean(Y), [')'] ,[$] ,!.

% Check if it's a int
store(t_assignmentI(X,Y)) --> [store], ['('], [X], [','], number(Y), [')'] ,[$].

main(K) --> program(K).

```

and **types:**

```prolog
% Checking for a number, there is not real check though
number(X) --> [X], { number(X)}.

% Check if it's either true or false
boolean(true) --> [true].
boolean(false) --> [false].

string(X) --> ['"'], [X],['"'].

```

I’m stuck on getting the exe and being able to run program from the command line.

---

<div class="post-metadata">

**Author:** ![hnbeck](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/hnbeck/32/3149_2.png) [@hnbeck](https://swi-prolog.discourse.group/u/hnbeck)\
**Post date:** [April 16, 2021, 8:49am UTC](https://swi-prolog.discourse.group/t/windows-exe-of-my-program/3819/2 "2021-04-16T08:49:12Z")

</div>

Hi,

maybe this topic may contain useful information for you: [here](https://swi-prolog.discourse.group/t/swi-generated-executable-is-not-loading-dlls-from-the-local-directory/3678) and  
[here](https://swi-prolog.discourse.group/t/problem-with-saved-state-and-http-server-at-win10/2595)

Cheers

Hans
