Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
2 votes
2 answers
91 views

C++ Compile-Time Class With std::vector Member Variable and Use It's Data at Run-Time [duplicate]

I am trying to make a writer class, which would be used to turn data into a binary stream, at compile-time using a std::vector, and then converting it to std::array to be used at runtime. eg: #include ...
user15137921's user avatar
0 votes
1 answer
31 views

Tensorflow 2.17.0 build failed with bazel linux

I download the source code of tensorflow-2.17.0 from github, then i run 'configure' and build with bazel-6.5.0 successfully, > bazel build //tensorflow/core:tensorflow then i create a folder 'test'...
WardenAllen's user avatar
0 votes
0 answers
14 views

How to use gcc compiler on Github windows runners when using scikit-build-core [duplicate]

I'm using scikit-build-core to build my c++ program on github windows runners. I would like to use gcc instead of microsoft visual studio as the compiler. Below is how I configure compiler settings in ...
Jiawei Lu's user avatar
  • 537
0 votes
1 answer
80 views

why huge local variable array doesnt cause segment fault

#include<iostream> using namespace std; int main() { char arr[40960]; for(auto i =0;i<40960;++i) arr[i]='c'; std::cout<<sizeof(arr)<<std::endl; ...
Rain's user avatar
  • 47
1 vote
1 answer
70 views

gcc and clang disagree on using alias templates as template template argument [duplicate]

The code below compiles using gcc 14.1.1 but clang 18.1.8 doesn't accept it. Which one is right and is there any workaround? template <template <typename...> class T> struct s { ...
R.J's user avatar
  • 424
1 vote
1 answer
50 views

Setup libstdc++ for a given gcc version

New to Linux here. Already had gcc 11 and 12 on my ubuntu but compiled gcc-14 using following command: ./configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --...
Xemuth's user avatar
  • 447
0 votes
0 answers
59 views

How to locate the file that defines specific symbol through #define in C++?

For example, I want to locate the header file that defines _WIN32_WINNT, how can I do? I tried g++ -E but it does not work. Note that there may be multiple definitions of the same symbol. I want to ...
William's user avatar
  • 935
0 votes
0 answers
32 views

Need to convert a Visual studio C++ project to a Cmake [duplicate]

I have a c++ code repo it has almost 68 projects within it. It was initially created using MSVC. I need to build that same project with gcc using cmake. Is there a way to convert that to a CMAKE ...
Nesan Mano's user avatar
  • 2,126
-2 votes
0 answers
48 views

growisofs - How do I fix the errors returned by attempting to compile it in cygwin? [closed]

Context: I'm attempting to build growisofs from its source code (version 7.1) using the following command in the Cygwin terminal: make TARGET_ARCH=-m64, but it gives me several errors when I attempt ...
moochandaleech's user avatar
1 vote
1 answer
79 views

Why do I get a "for declaration does not refer into a class, class template or class template partial specialization" on Clang and not GCC [duplicate]

I currently have this block of code which does not throw a compiler error on GCC, but throws this compiler error on clang: error: nested name specifier 'MyEnum::' for declaration does not refer into ...
Moe Bataineh's user avatar
  • 1,080
1 vote
0 answers
18 views

Select specific version present in ld version script

Consider the setup present in this question: GNU LD symbol versioning & C++ binary backwards-compatibility Consider the version script. Is it possible to explicitly tell ld to limit the exposed ...
fusiled's user avatar
  • 309
3 votes
2 answers
109 views

GCC 14 "possibly dangling reference to a temporary" warning or not, depending on the function argument

In the following C++ code GCC 14 with -Wall -Wextra flags produces a possibly dangling reference warning for function g(), but not f(). Why? /* getval.h */ #include <string> std::string const &...
akryukov's user avatar
1 vote
2 answers
111 views

Why exception can not be caught on windows by msvc but on Linux by GCC [duplicate]

The same files on Windows and Linux as follow: std_exp.cpp #include <iostream> #include <string> #include <stdexcept> using namespace std; int main() { try { std::...
Monhde Sau Hung's user avatar
0 votes
0 answers
40 views

running ./configure returns error: Cannot link with libtool libs! (libltdl)

I am attempting to compile an older program on a new system. I've done this a few times with this same software and I have always been able to find some way to get it to work but this time I am ...
ZCT's user avatar
  • 329
0 votes
0 answers
33 views

Linker problem while retargeting newlib with static library [duplicate]

I use a Gnu Arm toolchain with GCC v12.3. I want to do some retargeting on my stm32. For this, I have a file stdlib_override.cpp: #include <cerrno> #include <sys/stat.h> #include <sys/...
Nicolas's user avatar
  • 618

15 30 50 per page
1
2 3 4 5
899