Re: Problems linking c++/SWI executable for Windows

Olivier Sallou <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 10/23/2013 03:49 AM, Kaitain Jones wrote:
> Got my SWI-powered app compiling and running on Linux and OSX. Not yet
> succeeded on Windows.
>
> I installed all the MinGW/gcc toolchain stuff today, and everything appears
> to be compiling as on the other two platforms, but it seems to be falling
> at the final linking hurdle. swipl-ld builds the two object files I was
> expecting without any apparent problems. But then it calls the final link
> phase to build the exe:
>
> *g++ -o s2.exe  s_int.obj s_helpers.obj -L"c:/program files/swipl/lib"
> -lswipl*
>
> At this point, it spits out a slew of linker errors:
>
> *s_helpers.obj:s_helpers.cpp:(.text+0x50c): undefined reference to
> `PL_new_term_ref'
> *
> *s_helpers.obj:s_helpers.cpp:(.text+0x52f): undefined reference to
> `PL_put_nil'*
> etc.
>
> In short, even though it finds either *libswipl.dll.a *or (?) *libswipl.lib*in
> *c:/program files/swipl/lib* (and complains if I move or rename them), it
> appears not to know what any of the Prolog-specific elements are at link
> time.
>
> Anyone know what's likely to be going on?
>
> This is a 64-bit Win7 environment, btw. (And I'm attempting the compile
> from inside a MinGW32 window.)
I am of no help, but I face exactly the same issue on Windows 8 with
MingW too.

Olivier
>
> Running the swipl repl works fine.
>
> Thanks,
>
> KJ
> -------------- next part --------------
> HTML attachment scrubbed and removed
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
>

-- 
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.