Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open NeoMathEngine.x64.Debug.lib #66

Closed
goodle06 opened this issue Aug 7, 2020 · 8 comments · Fixed by #68
Closed

Cannot open NeoMathEngine.x64.Debug.lib #66

goodle06 opened this issue Aug 7, 2020 · 8 comments · Fixed by #68

Comments

@goodle06
Copy link

goodle06 commented Aug 7, 2020

NeoML showing linker error. In Qt it looks like this:

:-1: error: LNK1104: cannot open file 'NeoMathEngine.x64.Debug.lib'

And in built libraries there is nowhere to be found NeoMathEngine.x64.Debug.lib.
When I'm trying with Visual studio, I'm getting following output:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C3861	'NOT_FOUND': identifier not found	NeoMLTest2	K:\NeoML\build64\debug\include\NeoML\TraditionalML\LdGraph.h	438	

Code snippet where error is located seems to be some kind of assertion, but I can't understand what's wrong:

inline void CLdGraph<Arc>::DetachArc( Arc* arc )
{
	// Delete the arcs from the starting node
	CLdGraphVertex* initial = vertices[arc->InitialCoord() - begin];
	NeoPresume( initial != 0 );
	int i = initial->OutgoingArcs.Find(arc);
	NeoAssert( i != NOT_FOUND ); //     PROBLEM IS HERE
	initial->OutgoingArcs.DeleteAt(i);
	// Delete the hanging node
	if( initial->OutgoingArcs.Size() == 0
		&&  initial->IncomingArcs.Size() == 0 )
	{
		delete initial;
		vertices[arc->InitialCoord() - begin] = 0;
	}

I have 4 of those errors.

@FedyuninV
Copy link
Contributor

Thanks for the report! It's a bug (NOT_FOUND must be replaced with NotFound). I will push fix soon.

@goodle06
Copy link
Author

@FedyuninV great, thanks!

@goodle06
Copy link
Author

@FedyuninV I replaced NOT_FOUND with NotFound, and now Visual Studio asks for 'NeoMathEngine.x64.Debug.lib':

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1104	cannot open file 'NeoMathEngine.x64.Debug.lib'	NeoMLTest	C:\Users\JackOfShadows\source\repos\NeoMLTest\NeoMLTest\LINK	1	

Any idea why is this happening? Mistakes related to NOT_FOUND are gone.

@FedyuninV
Copy link
Contributor

Can you put, please, your generate and build commands? What is inside your NeoMLTest project?

@goodle06
Copy link
Author

@FedyuninV , I'm building via command line with this input:

cmake -G "Visual Studio 16 2019" -A x64 K:\NeoML\NeoML2\src\NeoML -DCMAKE_INSTALL_PREFIX=K:\NeoML\NeoML2\target\release -DCMAKE_PREFIX_PATH=C:\Users\Me\vcpkg\installed\x64-windows

cmake --build . --target install --config Release

Inside NeoMLTest project I"ve just added headers and tried to compile:

#include <iostream>
#include <NeoMathEngine/NeoMathEngine.h>
#include <NeoOnnx/NeoOnnx.h>
#include <NeoML/NeoML.h>


int main()
{
    std::cout << "Hello World!\n";
}

@Columbiysky
Copy link

Columbiysky commented Aug 11, 2020

I faced same problem: LNK1104 cannot open file 'NeoMathEngine.x64.Release.lib, when try to compile next one (https://github.com/neoml-lib/neoml/blob/master/NeoML/docs/en/Tutorial/SimpleNet.md)
it's not working with x86/x64 Release/Debug, always same problem.
I tried to make another one project and faced this again...

#include <iostream>
#include "windows.h"
#include "NeoML/NeoMLCommon.h"
#include "NeoML/FineObjLite/FineObjLite.h"
#include "NeoML/Random.h"
#include "NeoML/NeoML.h"

int main()
{
    std::cout << "Hello World!\n";
}

Here is my project properties:

Linker -> input -> Additional Dependecies: 	NeoMathEngine.lib;NeoML.lib;
Linker -> General -> Additional Library Directories: D:\trash\neoml\Install\NeoMathEngine\src\Release;D:\trash\neoml\Install\src\Release;
C/C++ -> General -> Additional Include Directories: D:\trash\neoml\NeoMathEngine\include;D:\trash\neoml\NeoML\include;

@FedyuninV
Copy link
Contributor

FedyuninV commented Aug 11, 2020

I can't reproduce it locally, but I have an idea.

Can you please do the following:

  1. update to the latest master
  2. replace this line with #if defined( FINEOBJ_VERSION ) && !defined( CMAKE_INTDIR )

@goodle06
Copy link
Author

goodle06 commented Aug 12, 2020

@FedyuninV @Columbiysky , hello! I followed your instructions and it seems to be built successfully with following output with Release mode project:

1>------ Rebuild All started: Project: NeoMLTest, Configuration: Release x64 ------
1>NeoMLTest.cpp
1>Generating code
1>Previous IPDB not found, fall back to full compilation.
1>All 25 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
1>Finished generating code
1>NeoMLTest.vcxproj -> C:\Users\JackOfShadows\source\repos\NeoMLTest\x64\Release\NeoMLTest.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

In Debug mode it builds without any warnings:

1>------ Rebuild All started: Project: NeoMLTest, Configuration: Debug x64 ------
1>NeoMLTest.cpp
1>NeoMLTest.vcxproj -> C:\Users\JackOfShadows\source\repos\NeoMLTest\x64\Debug\NeoMLTest.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

I'll try to test it and return with results.

Please, see to correct include path to FineObjLite.h in NeoMLDefs.h. It is built with #include <FineObjLite.h> and doesn't compile until you change it to full path like this: #include <NeoML/FineObjLite/FineObjLite.h>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants