DLL linker problems (beginner)

I'm trying to link my program using MS VC++ 6.0, but get the following error:

LINK : warning LNK4031: no subsystem specified; CONSOLE assumed
+ loads of errors/warnings

Where is the problem? The project is based on an empty DLL project. Any ideas? My program does nothing special:

#include <windows.h>
#include <iostream>
#include <string>

using namespace std;

BOOL WINAPI DllMain(HINSTANCE hinstDll,
                                DWORD fdwReason,
                                LPVOID lpvReserved)
{
    switch (fdwReason)
    {
        ...
    }
    return (TRUE);
}

__declspec(dllexport) int GetDbTitle(char *dbPath,
                                                   char *serverName,
                                                   char *title)
{
    ...
}
boomerang061797Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

inprasCommented:
Hi boomerang
The warning says subsystem is not specified spesify the subsystem either as CONSOLE|WINDOWS|NATIVE|POSIX in the link tab of Project settings

Hope this helps
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
inprasCommented:
A typical application will have

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo

/subsystem:windows

/dll /incremental:yes /pdb:"Debug/dlltrycons.pdb" /debug /machine:I386 /out:"Debug/dlltrycons.dll" /implib:"Debug/dlltrycons.lib" /pdbtype:sept
0
boomerang061797Author Commented:
Works, but shouldn't the "/subsystem:windows" flag be set automatically when creating a Windows DLL?
0
inprasCommented:
Yes I do agree depends on the dll type U choose
Is the solution working correctly?
Regards
0
boomerang061797Author Commented:
Yes it works correctly, but I must say that most of the code I used, I cut from other places. I don't really understand how it all works,... but it does.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.