Author Topic: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me  (Read 39323 times)

Offline bmquan80

  • Newbie
  • *
  • Posts: 6
    • View Profile
I meet error, when I try to do example1 on hugin c++ API 6.6 is "fatal error LNK1104: cannot open file 'C:\Program.obj'"

   When i read api-munual.pdf, it show me do? but I can't know . How to do, If you know, Can you help me

(2b) Click “Properties” on the “Project” menu. Click the “Linker” folder, and
select the “Input” property page.
• Add the import library to the “Additional Dependencies” property:
– If hConfigurationi is Debug, add hugincpp27.2vc7d.lib.
– If hConfigurationi is Release, add hugincpp27.2vc7.lib.
Thanks a lot, if you help me.

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #1 on: January 12, 2010, 10:33:45 »
Dear User

This is a linker error and can be caused by a number of things. Perhaps you should go through this LNK1104 checklist from MSDN to solve the problem:
http://msdn.microsoft.com/en-us/library/ts7eyw4s%28VS.80%29.aspx
Hugin Expert A/S

Offline bmquan80

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #2 on: January 12, 2010, 20:39:46 »
Thanks You answer me, I have solve this problem, but I meet new error, when I compile program example? If You can, you can help me

fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?

  Thanks you  alot

Offline bmquan80

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #3 on: January 13, 2010, 07:43:37 »
Hello everybody,

     I am studing bayes and research bayes, when I try to do axemple API C++ 6.6.
and config follow help API help Hugin lite7.2, and run on visual c++ 2005
   
      a lot of axemple in http://staff.science.uva.nl/~wzajdel/cassandra_doc/External/HuginApiC++/

 I have config help, but i meet error
 
     error C2871: 'HAPI' : a namespace with this name does not exist
If You know, you can help me, Thanks you  a lot


Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #4 on: January 13, 2010, 13:20:33 »
Have you read section 1.3 "Using HUGIN API on Windows platforms"?
It seems that you have not followed the steps for setting up Visual Studio for Hugin C++ API entirely.

Regarding the C2871 error, I would guess that perhaps you have not included the Hugin header file. This may be due to a missing include statement in your code or perhaps the include search path is messed up.
Hugin Expert A/S

Offline bmquan80

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #5 on: January 13, 2010, 18:19:10 »
Thanks Martin Karlsen ,
   I create a project , on visual c++ 2005, I config true path include and library, and have comlipe success.but when I start project, it not run and appear message.
 "the application has fail start because hugincpp-7.2-vc8d.dll was not found"

     

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #6 on: January 14, 2010, 11:46:04 »
Easiest solution is to copy the hugincpp-7.2-vc8d.dll file to the application directory (same directory as the produced .exe file).
Hugin Expert A/S

Offline bmquan80

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #7 on: January 15, 2010, 19:26:10 »
Thanks Martin Karlsen ,
  I comlipe successful, but when I start dedugging i meet error, Can you help me

Unhandled exception at 0x7c81eb33 in bt1.exe: Microsoft C++ exception: HAPI::ExceptionInvalidProbabilityPotential at memory location 0x0012fcf4..

 

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: "fatal error LNK1104: cannot open file 'C:\Program.obj'" Can help me
« Reply #8 on: January 18, 2010, 14:23:38 »
The documentation for HAPI::ExceptionInvalidProbabilityPotential states:
"A negative value or a zero-sum distribution has been found in a probability potential."

This means that some table has an illegal configuration.

Make sure that all discrete node tables in your net does not:
  • consist entirely of zeroes
  • contain negative numbers

By the way, it is generally a good idea to handle exceptions using the try-catch construct.
« Last Edit: January 18, 2010, 14:25:09 by Martin Karlsen »
Hugin Expert A/S