Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7694407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:18:50+00:00 2026-05-31T21:18:50+00:00

I am just trying to make a vector, but it gives me a huge

  • 0

I am just trying to make a vector, but it gives me a huge error and I am following a working example from my other project. The code:

#include <stdio.h>
#include <stdlib.h>
#include <vector>
using namespace std;

struct organism {
    bool One;
    bool Two;
};
std::vector<organism> organisms;

int main() {
    printf("Content-type: text/html\n\n");
    printf("TEST");
    printf(getenv("QUERY_STRING"));

    return 0;
}

The error:

> "make" 
C:/MinGW/bin/gcc.exe -o build/e2.exe source/main.cpp
C:\Users\Stephen\AppData\Local\Temp\ccc0a0w2.o:main.cpp:(.text$_ZN9__gnu_cxx13new_allocatorI8organismE10deallocateEPS1_j[__gnu_cxx::new_allocator<organism>::deallocate(organism*, unsigned int)]+0xd): undefined reference to `operator delete(void*)'
C:\Users\Stephen\AppData\Local\Temp\ccc0a0w2.o:main.cpp:(.eh_frame$_ZNSt12_Vector_baseI8organismSaIS0_EED2Ev+0x13): undefined reference to `__gxx_personality_v0'
C:\Users\Stephen\AppData\Local\Temp\ccc0a0w2.o:main.cpp:(.eh_frame$_ZNSt6vectorI8organismSaIS0_EED1Ev+0x13): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
"make": *** [build] Error 1

> Process Exit Code: 2
> Time Taken: 00:01

I can compile it if I comment out std::vector<organism> organisms; but I have no clue what’s wrong with that line. It’s exactly the same in my other project, which compiles fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T21:18:51+00:00Added an answer on May 31, 2026 at 9:18 pm

    You need to compile with g++.exe instead of gcc.exe so that it will know it needs to link with the C++ library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make it working for quite some time,but just can't seem to
I am just messing around trying to make a game right now, but I
I'm following the example from the Rcpp intro Vignette, trying it with inline. f<-cxxfunction(signature(),
I am just trying to make a non-graphic game in Tkinter but am having
I'm still picking up ObjC and I'm just trying to make sure I understand
I just went through trying to make an alarm clock app with local notifications
I'm trying to make a RLE (Run-Length Encoder) Programme just for characters. I read
i'm trying to make a very simple YACC parser on Pascal language which just
I'm trying to make a Pinterest-like gallery for my portfolio. Nothing too fancy, just
How can I disable tinyMCE? I'm not trying to make tinyMCE not exist, just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.