A Simple, Fast and Effective Polygon Reduction Algorithm 代码 vscode编译过程

Posted tiny_ten

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了A Simple, Fast and Effective Polygon Reduction Algorithm 代码 vscode编译过程相关的知识,希望对你有一定的参考价值。

最近在看减面的内容

找了好久 终于找到了 这篇论文的源码
国外的博文
unity源码以及论文

这里记录一下 用vscode 编译这个98年代码的过程

基础环境

c++环境

参考:Visual Studio Code (vscode) 配置 C / C++ 环境

openGL 环境

参考:Setup OpenGL with VS Code

编译踩坑

然后进入了漫长地踩坑阶段(2、3天)
报错: multiple definition of xxx
最后发现 是 task.json写的有问题,导致cpp文件被重复编译

然后各种编译报错

可以看到是 缺一些库文件
比如 搜索 glnormal3fv
搜到windows官网
然后就可以看到 缺这个叫opengl

然后呢 进入再编译 再解决报错的循环:
最后找到了所有的依赖库 嗯嗯 就是下面这些,写到tasks.json里就好了
“-lglfw3dll”,“-lopengl32”,“-lWinmm”,“-lGlu32”,“-lGdi32”

tasks.json 如下:


    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        
            "type": "shell",
            "label": "task g++",    //修改此项
            "command": "G:\\\\Program Files\\\\mingw64\\\\bin\\\\g++.exe",
            "args": [ //"$file",
                "-g",
                "-o",
                "$fileDirname\\\\$fileBasenameNoExtension.exe",
                "-I$workspaceFolder/include",
                "-L$workspaceFolder/lib",	
                "$workspaceFolder/\\\\*.cpp",
                "$workspaceFolder/glad.c",
                "-lglfw3dll","-lopengl32","-lWinmm","-lGlu32","-lGdi32"
                
            ],
            "options": 
                "cwd": "G:\\\\Program Files\\\\mingw64\\\\bin"
            ,
            "problemMatcher": [
                "$gcc"
            ],
            "group": "build"
        
    ]

以上是关于A Simple, Fast and Effective Polygon Reduction Algorithm 代码 vscode编译过程的主要内容,如果未能解决你的问题,请参考以下文章

[论文理解] IMPROVING THE IMPROVED TRAINING OF WASSERSTEIN GANS: A CONSISTENCY TERM AND ITS DUAL EFFECT

Fast-BEV:A Fast and Strong Bird’s-Eye View Perception Baseline——论文笔记

A - Fast Fourier Transform

Writing a Simple Publisher and Subscriber (Python)

BBC-Present Simple and Present Continuous

Writing a Simple Publisher and Subscriber