VS.Net2k3 prob: links, but doesn't create .lib
-
Hi, I have a weird linking error happening in my C++ DLL project. In VS.Net 2003, when I compile my dll in release mode, I get the normal "linking... Creating library c:\some_path\blah.lib", but if I do the same in debug, I get "linking..." but the .lib doesn't get created/updated. Other than that, it seems to compile file. No errors get generated. I've checked the settings between both modes, and I can't see anything different between them. If I do a "rebuild all" it does update the .lib, but not if I just modify a file and compile the project. I don't want to "rebuild all" everytime I want to test a change. Any ideas? Thanks! DJCC
-
Hi, I have a weird linking error happening in my C++ DLL project. In VS.Net 2003, when I compile my dll in release mode, I get the normal "linking... Creating library c:\some_path\blah.lib", but if I do the same in debug, I get "linking..." but the .lib doesn't get created/updated. Other than that, it seems to compile file. No errors get generated. I've checked the settings between both modes, and I can't see anything different between them. If I do a "rebuild all" it does update the .lib, but not if I just modify a file and compile the project. I don't want to "rebuild all" everytime I want to test a change. Any ideas? Thanks! DJCC
I've noticed the same thing too. This is just a guess, but I think it's probably fine if the .lib file isn't updated. Basically the .lib file provides the interface for the DLL that you will link against in some other program. So, if you just update the implementation (rather than the function signatures) there is no reason to update the lib file, because the interface to the DLL remains the same. Again, I'm not 100% sure about that so someone correct me if I'm wrong, but I think you'll be fine linking against the .lib file even if it's not updated. --Dean
-
I've noticed the same thing too. This is just a guess, but I think it's probably fine if the .lib file isn't updated. Basically the .lib file provides the interface for the DLL that you will link against in some other program. So, if you just update the implementation (rather than the function signatures) there is no reason to update the lib file, because the interface to the DLL remains the same. Again, I'm not 100% sure about that so someone correct me if I'm wrong, but I think you'll be fine linking against the .lib file even if it's not updated. --Dean
The real problem I have with this is that when I start changing classes around (adding/removing methods), whenever I stop to and continue from a breakpoint, I get "runtime check failure #0" errors. If I rebuild, which updates the .lib file, I don't get these errors. DJCC
-
The real problem I have with this is that when I start changing classes around (adding/removing methods), whenever I stop to and continue from a breakpoint, I get "runtime check failure #0" errors. If I rebuild, which updates the .lib file, I don't get these errors. DJCC
See the project settings that you have the 'Import Library' option set under 'Linker->Advanced'. This controls the creation of the .lib file. Also, you must have a module definition file in your project. If this file doesn't exist, then the compiler/linker creates the export library only if you have dllexport-declarations inside the code files. This might result in incorrect behaviour if those functions which you add to the classes are not exported. The module definition file is not required to export any symbols. All that needs to be there is a line 'LIBRARY your_dll_name_here'. -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.