Menu

#192 Compile error after adding 2 libs

open
nobody
5
2008-07-30
2008-07-30
pararealist
No

Beginner with VCF.

Operating System: Winxp Pro SP3
System RAM: 2.0 GB
System CPU: Pentium(R) D CPU 3.40 GHz
Hard Drive Size: 521 GB
Computer Make or Vendor: Novatech
What caused the bug: Trying to compile Hello World.
Bug Severity: Mild (compile probs)
Email address: pararealist@ntlworld.com

Hello World example Compiles and runs OK.

Now i want to bind the Acknex Engine to the project.

I add these (needed by Acknex A7)
gdi32.lib
acknex.lib

to those in Linker Dependencies
comctl32.lib
odbc32.lib
odbccp32.lib
rpcrt4.lib
user32.lib

and
libc.lib to Linker Ignore Specific Library

and
C:\GStudioA7\wed.exe -p "$(OutDir)\$(ProjectName).exe"
to POST BUILD

Using MultiByte.

Then i get the two errors i did not get before:

c:\program files\vcf\src\vcf\applicationkit\textmodel.h(201) : warning C4267: 'argument' : conversion from 'size_t' to 'VCF::uint32', possible loss of data

c:\program files\vcf\src\vcf\applicationkit\textmodel.h(213) : warning C4267: 'argument' : conversion from 'size_t' to 'VCF::uint32', possible loss of data

Tried with Unicode but still same problem.
Will remove the added libs (gdi32.lib
acknex.lib) one by one tomorrow to see which one is causing problems, but i need both of them.

If in the meantime you have (encountered) any input on this, would be great to let me know?

Thanks, pararealist.

Discussion

  • pararealist

    pararealist - 2008-07-31

    Logged In: YES
    user_id=2098555
    Originator: YES

    Hah,

    removed the Linker CommandLine
    /NODEFAULTLIB:MSVCRTD.lib
    /NODEFAULTLIB:msvcprtd.lib

    and it runs now, albeit it does not
    execute the POST Command, Yet.

     
  • Jim Crafton

    Jim Crafton - 2008-09-29

    Couple of things you need to make sure of - the VCF code is generated to link to the Multi Threaded CRT as a DLL (/MD) - NOT statically (/MT). If your other lib you're trying to use is linking to the CRT statically then all sorts of hell will break loose - even if you get it to compile you'll have other issues. So, you need to make sure everyone is in agreement as far as what code generation model is being used.

    If you're linking to the VCF dynamically as a DLL, then the gdi libs should be brought in automatically - both the GraphicsKit and ApplicationKit use and link to it.

    If this is the problem, and I'm not 100% sure about this, though it kind of sounds like it is, then if you do not have the source to your other lib, you should be able to change the VCF's settings and just rebuild it all. Again, make sure that everything agrees and make sure that you change the code generation settings in each of the VCF's "kits", i.e if you're using the ApplicationKit, then you'll need to rebuild the AplpicationKit, GraphicsKit, and FoundationKit, and adjust the code gen settings on all three.

     
  • Nobody/Anonymous

    Thanks for your reply, but i have laid this aside for now.
    Maybe i will have a go later.

    Sometimes i wish i could multiply myself and therefore do many things at once.

     

Log in to post a comment.

MongoDB Logo MongoDB