小编cab*_*013的帖子

我需要帮助尝试使用MinGW编译GLFW的简单示例

我试图从GLFW的文档中编译一个例子.

我的库和源文件的文件夹结构是:

C:\ CPP \

glfw3.dll glfw3dll.a libglfw3.a test.cpp

包括\

GLFW \

glfw3.h glfw3native.h

#include <GLFW/glfw3.h>

int main(void)
{
    GLFWwindow* window;

    /* Initialize the library */
    if (!glfwInit())
        return -1;

    /* Create a windowed mode window and its OpenGL context */
    window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
    if (!window)
    {
        glfwTerminate();
        return -1;
    }

    /* Make the window's context current */
    glfwMakeContextCurrent(window);

    /* Loop until the user closes the window */
    while (!glfwWindowShouldClose(window))
    {
        /* Render here */ …
Run Code Online (Sandbox Code Playgroud)

c++ windows mingw g++ glfw

6
推荐指数
1
解决办法
4897
查看次数

C++ - Qt Creator中的Poco库

我正在尝试使用Qt Creator中的poco库和poco附带的一个示例,我已经在Visual Studio 2012中使用它,但我在Qt Creator中不断出现构建错误.我的lib路径中有.dll和.lib.

这是我的.pro文件

TEMPLATE = app
CONFIG += console
CONFIG -= qt

SOURCES += main.cpp
INCLUDEPATH += C:\Users\justin\Downloads\poco-1.4.6\Net\include
INCLUDEPATH += C:\Users\justin\Downloads\poco-1.4.6\Foundation\include

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lPocoFoundation
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lPocoFoundationd

INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/

win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoFoundation.lib
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoFoundationd.lib

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lib/ -lPocoNet
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lib/ -lPocoNetd

INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/

win32:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoNet.lib
else:win32:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/lib/PocoNetd.lib …
Run Code Online (Sandbox Code Playgroud)

c++ qt poco-libraries

5
推荐指数
1
解决办法
3154
查看次数

在Windows上使用MinGW编译Poco

我需要用MinGW编译poco,所以我可以在Qt Creator中使用它,但无法弄清楚如何,我已经设法在Visual Studio中编译poco但我不能在Qt Creator中使用这些库.

qt mingw poco-libraries

5
推荐指数
2
解决办法
6695
查看次数

标签 统计

c++ ×2

mingw ×2

poco-libraries ×2

qt ×2

g++ ×1

glfw ×1

windows ×1