Discussions related to Visual Prolog
PERRAUD
Posts: 14
Joined: 3 Sep 2001 23:01

Compilation error: lnk2534 (with VP 7.5)

Unread post by PERRAUD »

Hello,

A try convert my project in VIP7.0 to my new VIP7.5.

and i have this error 2534 when i compil.
Can you help me please ?

Thank you
Attachments
compilVIP.JPG
compilVIP.JPG (122.43 KiB) Viewed 12028 times
Daniel Perraud
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

Hi Daniel,

have you tried already to delete all Deb-, Deb64-, Exe-, Exe64-, Obj-, and Obj64-folders of your project and then to Rebuild All in VIP7.5.0.2?
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

There are detailed infos in the Upgrade Notes of the Release Notes. Supposably they can help you in the upgrade.
Regards Martin
PERRAUD
Posts: 14
Joined: 3 Sep 2001 23:01

Unread post by PERRAUD »

Thank you Martin,

I had read the notes on the updates, and I had to re-write the 'findall' and 'trap'.
I tried to recompile after deleting the temporary files, but I have the same error message.

Below the link to retrieve my project. (CAAGL.ZIP 413 Ko, project is project: CAAGL.vipprj)

https://1drv.ms/u/s!AuypDPPFdHXshSS6O6RfnEorUo-v

Can you tell me if you also get this error message?

Thank you for your help.
Daniel Perraud
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

Yes, I also get this error message when trying to compile your project.

It seems the error is thrown when the compiler tries to compile the text file CAAGL.DEF. After I removed the file from the project it compiled well.
Regards Martin
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

My attempt to fit your code into a project hull generated by VIP7.5.0.2:

https://1drv.ms/u/s!AinVXVo575qdkSVRQ6ILxoBHwWKN
Regards Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1395
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

I am not quite sure why you get that error message.

But either you should remove the #export directive in caagl.pro or remove the caagl.def file from the project.

Using #export and a def file are two alternative ways of specifying the exports (#export is the "modern" way, so I think you should remove the def file).

Bu the way, I would restructure the project into mode packages have each package in a separate directory (as like Martin Meyer does in his reconstruction of your project, just in even more packages).
Regards Thomas Linder Puls
PDC
PERRAUD
Posts: 14
Joined: 3 Sep 2001 23:01

Unread post by PERRAUD »

Happy new year 2017 !

Thank you fors your answers, i now get my dll.

bud it does not work. :-(
This is because of the list structures that have to change with the V7.5. (it seems to me)

My VIP dll is plugged into a Delphi program.
I pass Delphi variables 'string_list 'and 'integer_list'
These types are described like this in Delphi:

type
PChaineliste = ^listString;
listString = record
functor: byte;
value: PWideChar;
next: PChaineliste;
end;

PIntegerListe = ^listInteger;
listInteger = record
functor: byte;
value: integer;
next: PIntegerliste;
end;

Can you tell me how to describe now these 2 types prolog in Delphi?

Thank you.
Daniel Perraud
User avatar
Thomas Linder Puls
VIP Member
Posts: 1395
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Yes, that is correct. A list is now represented without functors, and an empty list is simply a null pointer.

<pre>type
PChaineliste = ^listString;
listString = record
value: PWideChar;
next: PChaineliste;
end;</pre>
Regards Thomas Linder Puls
PDC
PERRAUD
Posts: 14
Joined: 3 Sep 2001 23:01

Unread post by PERRAUD »

ok thank you, it's clear.

The notion of 'nil' must be different in Visual Prolog and Delphi

The test on the pointer to nil in Delphi like this: P=nil does not work.

With this fonction, it seems to work:

function isnil(const p: Pointer): Boolean;
begin
Result:= dword(addr(p^))=1;
end;

Do you think the function is well written ?

thank you.
Daniel Perraud
User avatar
Thomas Linder Puls
VIP Member
Posts: 1395
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

You are right the empty list it is not a null pointer but a pointer that has the value 1.

The implementation of the function looks correct, but I think would create it on the list types:

<pre>function isEmpty_integerList(const p: PIntegerListe): Boolean;
begin
Result := dword(addr(p^))=1;
end;</pre>
Regards Thomas Linder Puls
PDC
PERRAUD
Posts: 14
Joined: 3 Sep 2001 23:01

Unread post by PERRAUD »

OK. thanks for the advice.

The dll claims since version 7.5, in addition to the 3 dll: vpiKernel vipRun and vpiVpi.dll, the boostRegex.dll dll. Is this normal?
Daniel Perraud
User avatar
Thomas Linder Puls
VIP Member
Posts: 1395
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Yes, that is quite normal. Regular expressions (which is for example use by the editor) is handled by that DLL.
Regards Thomas Linder Puls
PDC
Post Reply