Compiling GTK Application under windows using MSYS2
I'm trying to compile my GTK+ 3 (using gtkmm3) program under windows.
After setting everything up, I now get the following error:
Error: Aggregate »GStatBuf sbuf« has incomplete type and cannot be defined
GStatBuf sbuf;
The same code compiles fine under linux.
Here is the Code that causes the trouble:
GStatBuf sbuf;
if(g_stat(some_c_string, &sbuf) == 0) {
some_var = sbuf.st_mtim.tv_sec;
I'm compiling my program using the following command:
/usr/bin/g++ Patte.cpp -o Patte -L/opt/lib `pkg-config gstreamer-1.0 gstreamer-video-1.0 gtkmm-3.0 --cflags --libs`
I would appreciate any help on this issue :)
Edit: The error occurs pretty deep into the program, so I am pretty sure that nothing that is included is missing.
c++ c mingw glib msys2
add a comment |
I'm trying to compile my GTK+ 3 (using gtkmm3) program under windows.
After setting everything up, I now get the following error:
Error: Aggregate »GStatBuf sbuf« has incomplete type and cannot be defined
GStatBuf sbuf;
The same code compiles fine under linux.
Here is the Code that causes the trouble:
GStatBuf sbuf;
if(g_stat(some_c_string, &sbuf) == 0) {
some_var = sbuf.st_mtim.tv_sec;
I'm compiling my program using the following command:
/usr/bin/g++ Patte.cpp -o Patte -L/opt/lib `pkg-config gstreamer-1.0 gstreamer-video-1.0 gtkmm-3.0 --cflags --libs`
I would appreciate any help on this issue :)
Edit: The error occurs pretty deep into the program, so I am pretty sure that nothing that is included is missing.
c++ c mingw glib msys2
1
In your earlier question you decided to use the 64-bit MinGW toolchain, so you should be using theg++
command (which resolves to/mingw64/bin/g++.exe
)
– David Grayson
Nov 25 '18 at 6:10
You should post your full file so we can see which headers you included. Bettter yet, make a Minimal, Complete, and Verifiable example.
– David Grayson
Nov 25 '18 at 6:12
When I tried using the raw g++ commans after installing the toolchain, I would get an error "spawn: No such file or directory", but strangely, now it works and which g++ also tells me the path u mentioned :) Maybe I should have closed and reopened the shell? Whatever, now the error I mentioned is gone, I'm getting others instead but I'll try to resolve them now. So thanks again :)
– tagelicht
Nov 25 '18 at 15:26
add a comment |
I'm trying to compile my GTK+ 3 (using gtkmm3) program under windows.
After setting everything up, I now get the following error:
Error: Aggregate »GStatBuf sbuf« has incomplete type and cannot be defined
GStatBuf sbuf;
The same code compiles fine under linux.
Here is the Code that causes the trouble:
GStatBuf sbuf;
if(g_stat(some_c_string, &sbuf) == 0) {
some_var = sbuf.st_mtim.tv_sec;
I'm compiling my program using the following command:
/usr/bin/g++ Patte.cpp -o Patte -L/opt/lib `pkg-config gstreamer-1.0 gstreamer-video-1.0 gtkmm-3.0 --cflags --libs`
I would appreciate any help on this issue :)
Edit: The error occurs pretty deep into the program, so I am pretty sure that nothing that is included is missing.
c++ c mingw glib msys2
I'm trying to compile my GTK+ 3 (using gtkmm3) program under windows.
After setting everything up, I now get the following error:
Error: Aggregate »GStatBuf sbuf« has incomplete type and cannot be defined
GStatBuf sbuf;
The same code compiles fine under linux.
Here is the Code that causes the trouble:
GStatBuf sbuf;
if(g_stat(some_c_string, &sbuf) == 0) {
some_var = sbuf.st_mtim.tv_sec;
I'm compiling my program using the following command:
/usr/bin/g++ Patte.cpp -o Patte -L/opt/lib `pkg-config gstreamer-1.0 gstreamer-video-1.0 gtkmm-3.0 --cflags --libs`
I would appreciate any help on this issue :)
Edit: The error occurs pretty deep into the program, so I am pretty sure that nothing that is included is missing.
c++ c mingw glib msys2
c++ c mingw glib msys2
asked Nov 25 '18 at 1:08
tagelichttagelicht
14311
14311
1
In your earlier question you decided to use the 64-bit MinGW toolchain, so you should be using theg++
command (which resolves to/mingw64/bin/g++.exe
)
– David Grayson
Nov 25 '18 at 6:10
You should post your full file so we can see which headers you included. Bettter yet, make a Minimal, Complete, and Verifiable example.
– David Grayson
Nov 25 '18 at 6:12
When I tried using the raw g++ commans after installing the toolchain, I would get an error "spawn: No such file or directory", but strangely, now it works and which g++ also tells me the path u mentioned :) Maybe I should have closed and reopened the shell? Whatever, now the error I mentioned is gone, I'm getting others instead but I'll try to resolve them now. So thanks again :)
– tagelicht
Nov 25 '18 at 15:26
add a comment |
1
In your earlier question you decided to use the 64-bit MinGW toolchain, so you should be using theg++
command (which resolves to/mingw64/bin/g++.exe
)
– David Grayson
Nov 25 '18 at 6:10
You should post your full file so we can see which headers you included. Bettter yet, make a Minimal, Complete, and Verifiable example.
– David Grayson
Nov 25 '18 at 6:12
When I tried using the raw g++ commans after installing the toolchain, I would get an error "spawn: No such file or directory", but strangely, now it works and which g++ also tells me the path u mentioned :) Maybe I should have closed and reopened the shell? Whatever, now the error I mentioned is gone, I'm getting others instead but I'll try to resolve them now. So thanks again :)
– tagelicht
Nov 25 '18 at 15:26
1
1
In your earlier question you decided to use the 64-bit MinGW toolchain, so you should be using the
g++
command (which resolves to /mingw64/bin/g++.exe
)– David Grayson
Nov 25 '18 at 6:10
In your earlier question you decided to use the 64-bit MinGW toolchain, so you should be using the
g++
command (which resolves to /mingw64/bin/g++.exe
)– David Grayson
Nov 25 '18 at 6:10
You should post your full file so we can see which headers you included. Bettter yet, make a Minimal, Complete, and Verifiable example.
– David Grayson
Nov 25 '18 at 6:12
You should post your full file so we can see which headers you included. Bettter yet, make a Minimal, Complete, and Verifiable example.
– David Grayson
Nov 25 '18 at 6:12
When I tried using the raw g++ commans after installing the toolchain, I would get an error "spawn: No such file or directory", but strangely, now it works and which g++ also tells me the path u mentioned :) Maybe I should have closed and reopened the shell? Whatever, now the error I mentioned is gone, I'm getting others instead but I'll try to resolve them now. So thanks again :)
– tagelicht
Nov 25 '18 at 15:26
When I tried using the raw g++ commans after installing the toolchain, I would get an error "spawn: No such file or directory", but strangely, now it works and which g++ also tells me the path u mentioned :) Maybe I should have closed and reopened the shell? Whatever, now the error I mentioned is gone, I'm getting others instead but I'll try to resolve them now. So thanks again :)
– tagelicht
Nov 25 '18 at 15:26
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53463825%2fcompiling-gtk-application-under-windows-using-msys2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53463825%2fcompiling-gtk-application-under-windows-using-msys2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
In your earlier question you decided to use the 64-bit MinGW toolchain, so you should be using the
g++
command (which resolves to/mingw64/bin/g++.exe
)– David Grayson
Nov 25 '18 at 6:10
You should post your full file so we can see which headers you included. Bettter yet, make a Minimal, Complete, and Verifiable example.
– David Grayson
Nov 25 '18 at 6:12
When I tried using the raw g++ commans after installing the toolchain, I would get an error "spawn: No such file or directory", but strangely, now it works and which g++ also tells me the path u mentioned :) Maybe I should have closed and reopened the shell? Whatever, now the error I mentioned is gone, I'm getting others instead but I'll try to resolve them now. So thanks again :)
– tagelicht
Nov 25 '18 at 15:26