.dll Question Linker warning in Visual Studio 2010

Evgheny

New member
Joined
Oct 18, 2011
Messages
29
Reaction score
0
Points
0
Location
Moscow
Hello forum.

I'm trying to write my first plugin, and I've read articles in your wiki, and followed the instruction of the video of here:

( thank the author for this video )

So, I've done everything like in video. Plugin works, but linker reports some warning, I read them, understand them, but don't understand how to fix them.

1>------ Build started: Project: FirstProj, Configuration: Debug Win32 ------
1> main.cpp
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(C:\Users\E\Documents\Orbiter2010\Orbitersdk\samples\FirstProj\Debug\FirstProj.dll) does not match the Linker's OutputFile property value (C:\Users\E\Documents\Orbiter2010\Modules\Plugin\first.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(992,5): warning MSB8012: TargetName(FirstProj) does not match the Linker's OutputFile property value (first). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
1> LINK : ..\..\..\..\Modules\Plugin\first.dll not found or not built by the last incremental link; performing full link
1> Creating library C:\Users\E\Documents\Orbiter2010\Orbitersdk\samples\FirstProj\Debug\FirstProj.lib and object C:\Users\E\Documents\Orbiter2010\Orbitersdk\samples\FirstProj\Debug\FirstProj.exp
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1> FirstProj.vcxproj -> C:\Users\E\Documents\Orbiter2010\Orbitersdk\samples\FirstProj\Debug\FirstProj.dll
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Studio 2010 create another folder-structure ( bigger depth of folder) so i've changed ..\..\lib to ..\..\..\lib in configuring ( I understood that it was right decision because, with the new path It finds all classes and libraries)

But why linker reports warning for non-mathicng output dir. And what to do with MSVCRT defaultlib?

Linker creates some another file (without extension) with the same name as .dll in Modules/Plugin folder.
 
Last edited:

agentgonzo

Grounded since '09
Addon Developer
Joined
Feb 8, 2008
Messages
1,649
Reaction score
4
Points
38
Location
Hampshire, UK
Website
orbiter.quorg.org
But why linker reports warning for non-mathicng output dir.
Not sure about this one. Never seen it.

And what to do with MSVCRT defaultlib?

The linker's complaining that you're project is currently setup to use both MSVCRT.lib and other libs, but these libs do not work together properly so the linker has ignored MSVCRT and it is telling you here that it's ignoring it. It is recommending that you explicitly ignore the lib. To do this, go to your project settings and go to Linker (I don't have VStudio installed, so this is from memory). You'll need to add to the end of the linker options something along the lines of "/NODEFAULTLIB:MSVCRT.lib" (which is telling the linker to not load that specific default lib (which it would otherwise do)).

Linker creates some another file (without extension) with the same name as .dll in Modules/Plugin folder.
Those are temporary build files. You don't need them but they are used as a cache so the linker doesn't have to do all the work again if only a small part of your project changes.
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Not sure about this one. Never seen it.
This is new in VS2010. It can be ignored for making Orbiter modules. Everything (e.g. debugger) works fine with them being different directories, and you don't need to delete the extra created files from your modules folder, which you'd get there if output directories of compiler and linker were the same.
 

Evgheny

New member
Joined
Oct 18, 2011
Messages
29
Reaction score
0
Points
0
Location
Moscow
Ok, thank you very much.

So i shouldn't pay attention on these warnings (about output dir) and I should add MSVCRT.lib to ignore list of linker in settings.
 

FatalFlux

New member
Joined
Dec 8, 2011
Messages
9
Reaction score
0
Points
0
A heads up to others with this problem:

Make sure you're separating your libraries to ignore with semi-colons, not commas as he did in the video. I was wondering why I was getting an error ignoring those libraries was supposed to fix and I noticed he got it wrong in the video and I just blindly copied what he typed. Hurp durp.

Happy modding!
 
Top