Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Winmain@16 error

Does anyone know how to fix the "undefined reference to "Winmain16" error? (There is supposed to be an at symbol between main and 16 but treehouse does something weird if I put that symbol in the text). I am trying to get SDL to work with VS Code and I get that error. It seems that this is a common error, looking it up on the internet. Yet through all of those webpages I couldn't find one valid solution. Here is my json file I'm trying to build with to make this work:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g",
                "-o",
                "-c",
                "C:/MinGW/bin/main2.cpp",
                "C:/MinGW/bin/main.cpp",
                "C:/MinGW/bin/SDL2.lib",
                "-lmingw32",
                "-mwindows"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        },
        {
            "label": "echo",
            "type": "shell",
            "command": "g++",
            "args": [
                "-o",
                "C:\\MinGW\\bin\\main.cpp",
                "C:\\cpp\\pointer.o"
            ],
            "problemMatcher": [
                "$gcc"
            ]
        }
    ]
}