Class type redefinition problem

Pages: 123
I say cross that bridge when you come to it.

Or just statically link.
Haha.

What's the difference between static and dynamic linking? I've never completely understood it.
Statically linked builds the library right into the exe, so you don't need to have any extra DLLs.

Pro: no dll files needed
Con: larger exe

dynamically linking keeps the DLL separate

Pro: multiple programs can use the same DLL, and all programs can be significantly smaller in size
Con: missing dll files are a possibility
Neato, how might i change that setting in my compiler?

(sorry for bombarding you with questions, :P)

I've always had an issue with getting my programs to run on other computers, there was a setting uncer c++ -> Code generation, /MT i think, that supposedly allowed my exe's to run on different comps, d'you know if that's correct?
Sorry for not answering for a while, I needed to go to bed.

Is it the OS's system-folder i should put the .dll in? Is there more than one .dll file that needs to be copied?

I also need to say:
(sorry for bombarding you with questions, :P)
^^

Edit: And yes, it's a runtime error. My bad.
Last edited on
Yeah, in windows XP its C:\WINDOWS\System32.
All of the .dll's in the SFML-1.6\lib folder need to be moved there.
Last edited on
Neato, how might i change that setting in my compiler?


It depends on the library you're working with. Some libraries (like SFML) come with static and dynamic .lib files, so if you want static linking, just link to the static .lib.

If you're talking about VS's runtime library, then I'm not entirely sure. I think that Code generation option you mentioned might be it. I know there's some that's "Multi Threaded" and "Multi Threaded DLL". If I had to bet I'd say that the ones that say "DLL" are the dynamic links, and the ones that don't are the static links.
Thumper (44)   Sep 10, 2010 at 12:44pm
Yeah, in windows XP its C:\WINDOWS\System32.
All of the .dll's in the SFML-1.6\lib folder need to be moved there.

Thanks. I won't know if it works til monday since I'm at my dad's house for the weekend.
Thanks Disch. :)
I was at mom's house to test if it worked. It didn't. I still get the same exact runtime error. I copied all of the .dll files that I could find.
was sfml-system.dll among the dll's you copied?
Yes, it was. I even copied a sfml-system d.dll, I think.
Are you sure you're copying them to the right folder?

Are there lots of other dll files in that folder?
C:\Windows\System32

Yeah, I did it again just to check.

The majority of the files in System32 are .dll files. There are also some other folders in there.

Maybe I should just format my computer and install everything again.
Last edited on
Are you talking about World Of Warcraft ?
man if yes, i really dont see the need of your file. For what you are trying to do i used .sql files with HeidiSQL.
Nope :P. SFML C++ Library :)
Lol, World Of Warcraft?
I don't think any of us mentioned that.. lol
Yeah, so now I''ve uninstalled VC2010 and installed it again to be sure that everything from before was deleted. I also deleted and downloaded SFML again.

So just to be sure this time that I do everything right from the start I'm asking you this: There are .dll files in my "lib" folder. Am I supposed to copy them too or am I only supposed to copy the .lib files?
Last edited on
the .dll's are required at runtime to support the lib.
The only ever need to copy the .dll's.
Sorry, I wasn't clear on what I meant. I meant when you copy from SFML\lib to VC\lib.

EDIT: I solved it. I watched this vid: http://vimeo.com/12544814. Thank you all for your help!
Last edited on
Topic archived. No new replies allowed.
Pages: 123