Help Finding a Setting

In VC++ 6.0 you could add a dll's lib file by going to project/settings/link and add the DLL's LIB file to the Object/library modules field.  How do you accomplish this in MS Visual Studio 2005




Answer this question

Help Finding a Setting

  • smgtreker

    Hello:

    Project Settings are now managed via Property Pages.

    Right Click on the project in the solution view and select "Properties", or select the project in the Project->Properties Menu.  This will bring up the property page for the project in question.

    Select the appropriate configuration and platform.  Expand "Configuration Properties", then "Linker" in the tree control on the left.  Select "Input" and add your .lib files to the"Additional Dependencies" line.

    Hope This Helps



  • john blamey

    Hi James:

    Sounds like you are on the right track.  You might also want to move the other system includes (windows.h, stdio.h and string.h) to the stdafx.h file so they will be included in the pre-compiled header file (.pch).  This will speed up your compile times by not having the compiler repeatedly compile the headers that don't change every time you compile the source file they are included in...

     



  • Qllie

    Figured a good portion of this out.  I moved the

    #include "stdafx.h" to the top of the file and it got rid of most the errors. 



  • C_w

    Thanks Rick.

    I'm not sure if I should start a new thread, but here's what I'm trying to do:

    I have a third party dll, library and an example Visual Studio MFC project that was sent to me.  The project compiles and the executable works correctly.  I need to create a dll that calls this third party dll.  I'm new to programming and don't understand what's all going on in the sample app that was sent to me, so I'm trying to create a simple win32 console application that calls the dll.  Here's the steps I've taken:

    1. Created a Win 32 console app named Biowwin.
    2. Built the solution
    3. Placed BIOWDLL.lib in the Biowwin folder with the other source code.
    4. Placed biowdll.dll into the Biowwin/debug folder where biowwin.exe is located.        5. * added BIOWDLL.lib to the Additional Dependencies
    6. Created the following code:

    [code]
    // Biowwin.cpp : Defines the entry point for the console application.
    //

    #include <windows.h>
    #include "stdafx.h"
    #include <stdio.h>
    #include <string.h>

    __declspec ( dllexport )int WINAPI GetSrcBIOWIN (PSTR cSmilePass,
       PSTR cChemical, PSTR EstLin, PSTR EstNon, PSTR EstUlt, PSTR EstPrim,
       PSTR UltTime, PSTR PrimTime, PSTR EstMitiLin, PSTR EstMitiNon,
       PSTR DetailResults, PSTR numLines, PSTR ErrorMess);


    char EstLin[15];
    char EstNon[15];
    char EstUlt[15];
    char EstPrim[15];
    char EstMitiLin[15];
    char EstMitiNon[15];
    char UltTime[30];
    char PrimTime[30];
    char Details[12000];
    char ErrMess[1200];
    char numLines[12];

    int _tmain(int argc, _TCHAR* argv[])
    {

        int Ret1 = GetSrcBIOWIN("O=C","ChemName",
                   EstLin,EstNon,EstUlt,EstPrim,
                   UltTime,PrimTime,EstMitiLin,EstMitiNon,
                   Details,numLines,ErrMess);

        return 0;
    }
    [/code]
     
    When I build the solution, I get the following errors:
    [code]

    ------ Rebuild All started: Project: Biowwin, Configuration: Debug Win32 ------

    Deleting intermediate and output files for project 'Biowwin', configuration 'Debug|Win32'

    Compiling...

    stdafx.cpp

    Compiling...

    Biowwin.cpp

    c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C2146: syntax error : missing ';' before identifier 'GetSrcBIOWIN'

    c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C2065: 'PSTR' : undeclared identifier

    c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C2146: syntax error : missing ')' before identifier 'cSmilePass'

    c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

    c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(12) : error C2059: syntax error : ')'

    c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(34) : error C2064: term does not evaluate to a function taking 13 arguments

    Build log was saved at "file://c:\Documents and Settings\epajn\My Documents\Visual Studio 2005\Projects\Biowwin\Biowwin\Debug\BuildLog.htm"

    Biowwin - 6 error(s), 0 warning(s)

    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    [/code]

    I'm stuck.  Is there anything that stands out



  • Help Finding a Setting