Cannot open file 'tgui-d.lib'
« on: 05 October 2017, 05:54:06 »
I get this error when I try to compile the simple test program from the "minimal code" tutorial. I've got the SFML and TGUI include directories added, as well as the libraries.  I also made sure to put the dll in the project folder. Lastly, I know SFML is working as I've ran some code using it before installing TGUI.
Anything I forgot to do?

edit: v 0.8-dev
« Last Edit: 05 October 2017, 06:04:17 by Crimsowned »

*

texus

  • *****
  • 1151
    • View Profile
    • Texus's Blog
Re: Cannot open file 'tgui-d.lib'
« Reply #1 on: 05 October 2017, 07:58:38 »
I don't see any reason why it wouldn't find it, unless there is no tgui-d.lib in "C:\Users\charles\TGUI-0.8-dev\lib" or "C:\Users\charles\TGUI-0.8-dev\lib" does not exist.

Could you send the project file (vcxproj file)?

In case neither of us can figure out what's wrong, I think you could also just copy the lib file next to your project as a workaround.

Re: Cannot open file 'tgui-d.lib'
« Reply #2 on: 05 October 2017, 13:18:45 »
The tgui-d.lib file is inside the debug folder, which is in the lib folder. If I move it directly into the lib folder, I get a "cannot open file *\TGUI-test.exe" error, which I'm unsure is an improvement. In any case, here's the file.

Thanks for your time.

*

texus

  • *****
  • 1151
    • View Profile
    • Texus's Blog
Re: Cannot open file 'tgui-d.lib'
« Reply #3 on: 05 October 2017, 18:37:58 »
The file should be directly in the lib folder, there should not be a Debug or Release folder inside the lib folder.

I don't know why you get the "cannot open file *\TGUI-test.exe" error though. Is that the only error you get? Are there no compile or linking errors?

Re: Cannot open file 'tgui-d.lib'
« Reply #4 on: 06 October 2017, 01:54:59 »
This is the exact message.

The Debug folder was created when I ran cMake, so I find it a little odd that it is there if it should not be. I think I`ll try rebuilding TGUI...


edit: tried rebuilding the solution and I still get the same error. Same happens if I try to use the pre compiled libraries.

edit2: created a new project and managed to make that one compile. Still do not know where the previous error came from, but thanks for your help nonetheless! :)
« Last Edit: 06 October 2017, 02:44:40 by Crimsowned »

Re: Cannot open file 'tgui-d.lib'
« Reply #5 on: 06 October 2017, 02:21:53 »
In case you see something.

*

texus

  • *****
  • 1151
    • View Profile
    • Texus's Blog
Re: Cannot open file 'tgui-d.lib'
« Reply #6 on: 06 October 2017, 08:02:55 »
I don't know what was wrong, based on what I can find about the error it would usually occur when the exe is locked somehow (still running or some build process crashed while still having the file locked).

Quote
The Debug folder was created when I ran cMake, so I find it a little odd that it is there if it should not be
It's not CMake that is to blame here though, it's Visual Studio. With gcc I can just copy the build/lib folder next to the include folder but with VS I have to delete the Debug or Release folder inside it. The precompiled downloads don't have the subfolders.