Re: linkage problems when building a VC7.1 project from the command line




link /OUT:timer.dll /INCREMENTAL /NOLOGO /DLL /DEBUG /SUBSYSTEM:WIND
OWS /IMPLIB:timer.lib /MACHINE:X86 Winmm.lib kernel32.lib user32.lib
gdi32.lib winspool.lib advapi3
2.lib shell32.lib
LINK : warning LNK4001: no object files specified; libraries used
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
timer.dll : fatal error LNK1120: 1 unresolved externals

Whats going on?. I suspect I must be using lib.exe somewhere along the
line in the build process (or is this a red herring?)

at least one problem seems to be that your link command does not take object
files as inputs.
without any object files, the linker only links the lib files, which do not
contain any entry points

If I look at a random link command on my system, it contains a list of
object files to link together.
/OUT:"D:\Projects\Visual Studio
Projects\TryoutProjects\LvArrayTemplate\Debug\LvArrayTemplate.exe"
/INCREMENTAL /MANIFEST
/MANIFESTFILE:"Debug\LvArrayTemplate.exe.intermediate.manifest" /DEBUG
/PDB:"d:\Projects\Visual Studio
Projects\TryoutProjects\LvArrayTemplate\debug\LvArrayTemplate.pdb"
/SUBSYSTEM:CONSOLE /MACHINE:X86 kernel32.lib user32.lib gdi32.lib
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
uuid.lib odbc32.lib odbccp32.lib

".\Debug\LvArrayTemplate.obj"

".\Debug\stdafx.obj"

".\Debug\LvArrayTemplate.exe.embed.manifest.res"

If your project links fine when using the IDE, check the buildlog to find
the differences between what the IDE does and what your command line does.

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"


.