User forums > Using Code::Blocks
How to build dll on win32
thomas:
Getting lots and lots of "multiple definition of..." errors usually happens when you accidentially link with both the object files and a static library.
Probably you have built the static library first, and now you're linking the DLL, and the static lib is in the linker's options, too. Thus, the linker first links all the individual object files, and then again the static library, which of course has the very same symbols.
siomek:
...and everything works properly (using MinGW on Win32).
1. Yes, it works. But MSVC++ builts static lib, not dynamic lib.
Edit: According to the sources that are imported that way I wonder why you compile "doublefann.c", too? This is not part of the workspace...?!
2. Yes, my mistake. I removed unnecessary files. Now, it works. Thanks. It builds dll lib.
Getting lots and lots of "multiple definition of..." errors usually happens when you accidentially link with both the object files and a static library.
Probably you have built the static library first, and now you're linking the DLL, and the static lib is in the linker's options, too. Thus, the linker first links all the individual object files, and then again the static library, which of course has the very same symbols.
3. My mistake. I removed unnecessary files and CB builds dll lib. Thaks very much for help.
Navigation
[0] Message Index
[*] Previous page
Go to full version