Page 1 of 1
Compilation error: lnk2534 (with VP 7.5)
Posted: 28 Dec 2016 11:30
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
Posted: 28 Dec 2016 18:01
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?
Posted: 28 Dec 2016 18:31
by Martin Meyer
There are detailed infos in the Upgrade Notes of the
Release Notes. Supposably they can help you in the upgrade.
Posted: 29 Dec 2016 8:54
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.
Posted: 29 Dec 2016 16:31
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.
Posted: 29 Dec 2016 17:39
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
Posted: 30 Dec 2016 0:31
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).
Posted: 3 Jan 2017 10:59
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.
Posted: 3 Jan 2017 20:52
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>
Posted: 4 Jan 2017 11:02
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.
Posted: 4 Jan 2017 20:18
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>
Posted: 5 Jan 2017 15:49
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?
Posted: 5 Jan 2017 21:04
by Thomas Linder Puls
Yes, that is quite normal. Regular expressions (which is for example use by the editor) is handled by that DLL.