Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

External dependencies in Visual C++ Express

Name: Anonymous 2011-09-06 21:23

I keep looking for a solution on how to get the external dependencies to load for a basic SDL program I'm doing. I'm new to programming, but here's what I wrote.

#include <iostream>
#include "conio.h"
#include "sdl.h"
using namespace std;

void main()
{
    int SDL_Init(Uint32 flags);

    void SDL_Quit(void);
    _getch();
}

And here's what I get

1>------ Build started: Project: sdl tut, Configuration: Debug Win32 ------
1>  main.cpp
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\Matt\documents\visual studio 2010\Projects\sdl tut\Debug\sdl tut.exe : fatal error LNK1120: 1 unresolved externals

There's probably an easy fix that's just blown right past me.

Name: Anonymous 2011-09-06 21:41

you know you have to include the SDL .dll in any SDL app you make to run as a standalone, right?

Name: Anonymous 2011-09-06 21:45

Yep, included, marked off, added to additional dependencies, etc, etc, etc

Name: Anonymous 2011-09-06 21:54

you might have forgotten linker flags, you might have not included all the .dll's to your project, you might have not included the libs to your project

Name: Anonymous 2011-09-06 23:21

Try this: use a real language on a real operating system.

Name: Anonymous 2011-09-07 0:27

>>5
And download it for Free!
http://www.losethos.com/

Don't change these.
Name: Email:
Entire Thread Thread List