FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 


Compilation error: lnk2534 (with VP 7.5)

Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog
View previous topic :: View next topic  
Author Message
PERRAUD



DIJON, France
Joined: 03 Sep 2001
Posts: 14

PostPosted: 28 Dec 2016 11:30    Post subject: Compilation error: lnk2534 (with VP 7.5) Reply with quote

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



compilVIP.JPG
 Description:
 Filesize:  122.43 KB
 Viewed:  609 Time(s)

compilVIP.JPG



_________________
Daniel Perraud
Back to top
View user's profile Send private message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 210

PostPosted: 28 Dec 2016 18:01    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 210

PostPosted: 28 Dec 2016 18:31    Post subject: Reply with quote

There are detailed infos in the Upgrade Notes of the Release Notes. Supposably they can help you in the upgrade.
_________________
Regards Martin
Back to top
View user's profile Send private message
PERRAUD



DIJON, France
Joined: 03 Sep 2001
Posts: 14

PostPosted: 29 Dec 2016 8:54    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 210

PostPosted: 29 Dec 2016 16:31    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Martin Meyer



Frankfurt a.M., Germany
Joined: 14 Nov 2002
Posts: 210

PostPosted: 29 Dec 2016 17:39    Post subject: Reply with quote

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

https://1drv.ms/u/s!AinVXVo575qdkSVRQ6ILxoBHwWKN

_________________
Regards Martin
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3077

PostPosted: 30 Dec 2016 0:31    Post subject: Reply with quote

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
Prolog Development Center
Back to top
View user's profile Send private message
PERRAUD



DIJON, France
Joined: 03 Sep 2001
Posts: 14

PostPosted: 3 Jan 2017 10:59    Post subject: Reply with quote

Happy new year 2017 !

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

bud it does not work. Sad
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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3077

PostPosted: 3 Jan 2017 20:52    Post subject: Reply with quote

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

type 

PChaineliste = ^listString;
listString = record
value: PWideChar;
next: PChaineliste;
end;

_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
PERRAUD



DIJON, France
Joined: 03 Sep 2001
Posts: 14

PostPosted: 4 Jan 2017 11:02    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3077

PostPosted: 4 Jan 2017 20:18    Post subject: Reply with quote

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:

function isEmpty_integerList(const p: PIntegerListe): Boolean; 

begin
Result := dword(addr(p^))=1;
end;

_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
PERRAUD



DIJON, France
Joined: 03 Sep 2001
Posts: 14

PostPosted: 5 Jan 2017 15:49    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Thomas Linder Puls



Copenhagen, Denmark
Joined: 28 Feb 2000
Posts: 3077

PostPosted: 5 Jan 2017 21:04    Post subject: Reply with quote

Yes, that is quite normal. Regular expressions (which is for example use by the editor) is handled by that DLL.
_________________
Regards Thomas Linder Puls
Prolog Development Center
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    discuss.visual-prolog.com Forum Index -> Visual Prolog All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum