Questions tagged [tdm-mingw]
51 questions
1
vote
0 answers
Allegro - 'pkg-config' doesn't work
I have problem compiling code from https://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial/Displays on CodeBlocks:
#define ALLEGRO_STATICLINK
#include
#include
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY…

Renerte
- 31
- 5
1
vote
0 answers
-static-libstdc is not recognized in NetBeans
Please help me why does it says "g++.exe: unrecognized option '-static-libstdc++'" when I compile my cpp code in netbeans?
my build output is as follows.
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS=…

Isuru Ranawaka
- 105
- 10
1
vote
3 answers
Access to global data in a dll from an exported dll function
I am creating a C++ Win32 dll with some global data. There is a std::map defined globally and there are exported functions in the dll that write data into the map (after acquiring a write lock, ofcourse).
My problem is, when I call the write…

Sahas
- 10,637
- 9
- 41
- 51
0
votes
2 answers
g++ :cannot execute ‘DIRECTORY/collect2.exe’:CreateProcess: No such file or directory
When I compile c++ and c files together with the following command:
g++ io.c *.cpp -o main -D__STDC_FORMAT_MACROS
error occurs:
g++.exe: fatal error:cannot execute ‘C:/TDM-GCC-32/bin/../libexec/gcc/mingw32/9.2.0/collect2.exe’: CreateProcess: No…

shijy
- 21
- 3
0
votes
1 answer
Why do the square of input decreases by one when using pow function?
Here is a simple C program, which accepts a number from the user and results it's square.
#include
#include
int main()
{
int number;
int result;
printf("\nEnter the number\n");
scanf("%d",&number);
…

Gaurav
- 80
- 1
- 5
0
votes
0 answers
OpenMP parallel program of Fibonacci is slower than sequential
I have this sequential code:
int fib(int n) {
int x, y;
if (n < 2)
return n;
x = fib(n-1);
y = fib(n-2);
return x + y;
}
And this parallel code:
int fib(int n) {
int x, y;
if (n < 2)
return n;
#pragma omp task shared(x)
x = fib(n-1);
#pragma…

glo
- 75
- 6
0
votes
2 answers
failed to compile debug in wxwidgets windows 10
I want to develop apps across multiple platform. I am new with wxwidgets. I want to compile debug but it produce an error. this is my command result. please help me. so far i've done apps using wpf mvvm c# but it can only be run in windows env. so…

Mace
- 105
- 2
- 17
0
votes
0 answers
Compile C in windows: TDM vs MinGW
I was reading about different C compilers and want to figure out the proper way to compile C programs in windows. I found this link on the go and then I started reading about TDM and minGW compilers. What information i gained from the reading…

Hari Krishnan
- 5,992
- 9
- 37
- 55
0
votes
0 answers
a.exe terminal closes just after program execution stops
I have installed TDM-GCC compiler on my system. And I write my c programs in a text editor and save it with the .c extension and compile it using the gcc command in the MinGW terminal and as usual the a.exe file is created as a result of it but when…

Rittam Das
- 3
- 4
0
votes
1 answer
typedef of character array and use in functions
I want a type of cstring with a fixed maximum length, lets say 5. I would also like to be able to use the standard cstring functions if possible.
However with this, i get alot of problems with function parameters. I'm not really familiar with…

ProjectPaatt
- 15
- 2
- 8
0
votes
1 answer
g++ (tdm-1) 4.7.1 doesnt support all c++11 features
it's supposed g++ (tdm-1) 4.7.1 that comes with codeblocks for windows support all C++11 features, std::stoi(str) isnt reconized, same for other c++11 functions. (string header is included).
Do i need to look for another compiler ?

Cfun
- 8,442
- 4
- 30
- 62
0
votes
1 answer
Error-flood when compiling simple hello world program
I'm trying to compile a simple hello world program:
main.cpp
#include
#include
int main( int argc , char** args )
{
std::cout << test() << std::endl;
int x;
std::cin >> x;
return 0;
}
test/t.hpp
#ifndef…

nonsensation
- 3,627
- 6
- 28
- 41
0
votes
1 answer
Declare simd using exp from math.h on TDM-GCC 4.92
I need to vectorize a loop with a call to the exp-function in math.h. However, compiling a file with this
#include
#include
#pragma omp declare simd
extern double __cdecl exp(double);
seems not to be possible, as I get the…

Jeppe Druedahl
- 21
- 1
0
votes
1 answer
libnfc cmake header file compilation error
Am programming for NFC using the libnfc library in the C language. Am using the TDM-GCC MinGW Compiler and the CMAKE open source build system which I installed following this tutorial for building/compiling the code. I am trying to compile my…

Peter
- 648
- 7
- 26
0
votes
1 answer
DevCPP Make file error
I am trying to compile the code, but i am getting this error, I don't understand this, and what is wrong with my code
# Project: Project1
# Makefile created by Dev-C++ 5.6.0
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
OBJ =…

Imran Hussain
- 25
- 6