It is currently Sat Aug 22, 2020 4:15 am


All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: PolyVox dll problems
PostPosted: Sun Feb 27, 2011 7:39 am 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
I have been having quite a bit of trouble getting PolyVox integrated into my project. I have managed to fight through every error until I hit this one.

PolyVoxUtil.dll : fatal error LNK1107 : invalid or corrupt file: cannot read at 0x2D0

I am using Visual Studio 2010, and I have recompiled the library multiple times in the hope that would fix it. I have also moved the dll files around to different locations in hope that would fix the problem. No matter what I do VS still thinks they are corrupted.

Does anyone know why this might be happening, or what I can do to fix it?

I would rather not reinvent the voxel wheel, but its looking like that might
have been easier.

Also is there any pre-built library available that I could download?

Thanks for the help.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Sun Feb 27, 2011 9:48 am 

Joined: Sun Jan 23, 2011 6:06 am
Posts: 92
I am using Visual Studio Express 2010 without any problems. I link PolyVoxCore.lib and PolyVoxUtil.lib and haven't had any errors come up.... but I haven't tried compiling PolyVox since the 13/01/2011 version.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Sun Feb 27, 2011 11:20 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Hi,

I assume you are not linking against the .dll directly, but are actually linking against the .lib file, right? The .dll is only needed at run time, not compile time.

Did you get the PolyVox demo to build and run successfully? It's worth starting with this so that we know whether any problems you are having are actually with the .dll or with your own project settings. Did you build PolyVox using CMake, and are you using CMake for your own project?

I would also be interested in what the other errors you encountered were. It's possible that in fixing the earlier errors you broke something further down the line, as PolyVox should build and run without errors.

Another option you have is to try just dropping the PolyVox source code directly into your project, and building it as part of your project. Then you have no .dll dependancies anyway.

And no, there are currently no prebuilt binaries but we will provide some in the future.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Mon Feb 28, 2011 7:11 am 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
Thank you for the quick reply! I saw your post this morning and it alerted me to my error.

I assumed PolyVox uses dll files the same way my other libraries did. However it wanted me to link to the lib files instead. Now it compiles fine.

I will say though I was never able to get visual studio to compile the examples. I'm not sure what I did wrong. However the source code and doxygen documentation appear pretty helpful.

Thanks again for the help.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Mon Feb 28, 2011 5:24 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
In Visual Studios it doesn't matter whether you are linking to dynamic or static lib, you are required to specify a link dependency to a .lib file. The actual dynamic or static linkage is an option between multi-thread DLL or multi-thread static lib (or the single thread variant). That's how it is on windows, I think.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Tue Mar 01, 2011 10:17 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
It looks like I celebrated a bit too soon. It compiles just fine, but when I try to run the program it tells me...

The program can't start because PolyVoxCore.dll is missing from your computer. Try reinstalling the program to fix this problem.

I have tried putting copies in the debug folder, output folder, and code folder, and nothing works.

I must be doing something stupid, but I can't figure out what I'm missing.

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Tue Mar 01, 2011 10:55 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
you need the dll on the path of your executable. Just place them where your exe is located.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Tue Mar 01, 2011 11:04 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
I did put a copy next to the exe. I'm pretty sure their is only one exe, and it is in the debug folder in the main project folder.

I thought that would be enough as well. Is there a project variable I missed?

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox dll problems
PostPosted: Tue Mar 01, 2011 11:18 pm 
User avatar

Joined: Tue Feb 22, 2011 8:04 am
Posts: 101
It seems I mistyped my PATH variable in the Debugging options in Project Properties. I had quotations around the filepath and I should have left off the quotations.

My program now runs, so hopefully now PolyVox is completely installed and I can concentrate on coding.

Thanks for your help again!

_________________
--Real Programmers use a magnetized needle and a steady hand.
--xkcd--


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net