Re: compile executable on Windows 8
Olivier Sallou <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 10/22/2013 04:02 PM, Jan Wielemaker wrote: > On 10/22/2013 03:46 PM, Olivier Sallou wrote: >> HI, >> I tried to create a swiprolog executable on Windows 8 but I have error >> on unknown types. >> The same files/command works fine on linux, so I think it is really a >> matter of install/config on Windows. >> >> I installed swi-prolog and MinGW and declared their bin path in my PATH. >> >> When I execute the build command: >> >> swipl-ld -initfile file0.pl -o myfile.exe -v file1.c file2.pl .... >> >> I have errrors in my c file: >> unknown type name 'SP_qid', same for SP_errno etc.... > > Well, these are types from the SICStus foreign interface ... Possibly > you are using the emulation, and there is some error before that the > emulaiton header cannot be found or ... My fault, I compiled too quickly with sicstus prolog C file instead of swiprolog C file indeed..... But after replacing with the correct swi-prolog C file, I still faced undefined reference to PL_close_query,PL_halt,.... at link time on step: gcc -o myfile.exe myfile.obj -L"c:/program files/swipl/lib" -lswipl -> myfile.obj:myfile.c:(.text+0xb4): undefined reference to "PL_initialise" .... In c:/program files/swipl/lib, I have libswipl.dll.a Olivier > > Cheers --- Jan > >> >> The gcc command executed by swi-pl is: >> >> gcc -c -D_REENTRANT -D__WINDOWS__ -D_WINDOWS -D__SWI-PROLOG__ >> -D__SWI_EMBEDDED__ -I"c:/program files/swipl/include" -o myfile.obj >> file1.c >> >> Include path is correct though is has "/" instead of "\" for Windows. >> >> >> Is there any specific config to be done for Windows? >> >> Thanks >> >> Olivier >> > > > -- Olivier Sallou IRISA / University of Rennes 1 Campus de Beaulieu, 35000 RENNES - FRANCE Tel: 02.99.84.71.95 gpg key id: 4096R/326D8438 (keyring.debian.org) Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438